Skip to content

Commit

Permalink
formatted file
Browse files Browse the repository at this point in the history
Signed-off-by: Bharadwajshivam28 <[email protected]>
  • Loading branch information
Bharadwajshivam28 committed Oct 23, 2024
1 parent 0013e90 commit 6d639d1
Showing 1 changed file with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ func Test_GetRoundtripper(t *testing.T) {
},
}
tests := []struct {
name string
provider metricsapi.KeptnMetricsProvider
k8sClient client.Client
wantUser string
wantPassword string
name string
provider metricsapi.KeptnMetricsProvider
k8sClient client.Client
wantUser string
wantPassword string
wantRoundTripper http.RoundTripper
wantErr bool
errorStr string
wantErr bool
errorStr string
}{
{
name: "TestSuccess",
Expand All @@ -140,20 +140,20 @@ func Test_GetRoundtripper(t *testing.T) {
},
},
},
k8sClient: fake.NewClient(goodsecret),
k8sClient: fake.NewClient(goodsecret),
wantUser: "myuser",
wantPassword: "mytoken",
wantRoundTripper: config.NewBasicAuthRoundTripper("myuser", "mytoken", "", "", promapi.DefaultRoundTripper),
wantErr: false,
wantErr: false,
},
{
name: "TestSecretNotDefined",
provider: metricsapi.KeptnMetricsProvider{},
k8sClient: fake.NewClient(),
name: "TestSecretNotDefined",
provider: metricsapi.KeptnMetricsProvider{},
k8sClient: fake.NewClient(),
wantUser: "myuser",
wantPassword: "mytoken",
wantRoundTripper: config.NewBasicAuthRoundTripper("myuser", "mytoken", "", "", promapi.DefaultRoundTripper),
wantErr: false,
wantErr: false,
},
{
name: "TestErrorFromGetPrometheusSecretNotExists",
Expand All @@ -171,12 +171,12 @@ func Test_GetRoundtripper(t *testing.T) {
},
},
},
k8sClient: fake.NewClient(),
k8sClient: fake.NewClient(),
wantUser: "myuser",
wantPassword: "mytoken",
wantRoundTripper: config.NewBasicAuthRoundTripper("myuser", "mytoken", "", "", promapi.DefaultRoundTripper),
wantErr: true,
errorStr: "not found",
wantErr: true,
errorStr: "not found",
},
{
name: "TestInsecureSkipTlsVerifyEnabled",
Expand Down

0 comments on commit 6d639d1

Please sign in to comment.