Skip to content

Commit

Permalink
formatted file
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharadwajshivam28 committed Oct 23, 2024
1 parent c98c0c4 commit f4b9698
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 f4b9698

Please sign in to comment.