@@ -115,14 +115,14 @@ func Test_GetRoundtripper(t *testing.T) {
115
115
},
116
116
}
117
117
tests := []struct {
118
- name string
119
- provider metricsapi.KeptnMetricsProvider
120
- k8sClient client.Client
121
- wantUser string
122
- wantPassword string
118
+ name string
119
+ provider metricsapi.KeptnMetricsProvider
120
+ k8sClient client.Client
121
+ wantUser string
122
+ wantPassword string
123
123
wantRoundTripper http.RoundTripper
124
- wantErr bool
125
- errorStr string
124
+ wantErr bool
125
+ errorStr string
126
126
}{
127
127
{
128
128
name : "TestSuccess" ,
@@ -140,20 +140,20 @@ func Test_GetRoundtripper(t *testing.T) {
140
140
},
141
141
},
142
142
},
143
- k8sClient : fake .NewClient (goodsecret ),
143
+ k8sClient : fake .NewClient (goodsecret ),
144
144
wantUser : "myuser" ,
145
145
wantPassword : "mytoken" ,
146
146
wantRoundTripper : config .NewBasicAuthRoundTripper ("myuser" , "mytoken" , "" , "" , promapi .DefaultRoundTripper ),
147
- wantErr : false ,
147
+ wantErr : false ,
148
148
},
149
149
{
150
- name : "TestSecretNotDefined" ,
151
- provider : metricsapi.KeptnMetricsProvider {},
152
- k8sClient : fake .NewClient (),
150
+ name : "TestSecretNotDefined" ,
151
+ provider : metricsapi.KeptnMetricsProvider {},
152
+ k8sClient : fake .NewClient (),
153
153
wantUser : "myuser" ,
154
154
wantPassword : "mytoken" ,
155
155
wantRoundTripper : config .NewBasicAuthRoundTripper ("myuser" , "mytoken" , "" , "" , promapi .DefaultRoundTripper ),
156
- wantErr : false ,
156
+ wantErr : false ,
157
157
},
158
158
{
159
159
name : "TestErrorFromGetPrometheusSecretNotExists" ,
@@ -171,12 +171,12 @@ func Test_GetRoundtripper(t *testing.T) {
171
171
},
172
172
},
173
173
},
174
- k8sClient : fake .NewClient (),
174
+ k8sClient : fake .NewClient (),
175
175
wantUser : "myuser" ,
176
176
wantPassword : "mytoken" ,
177
177
wantRoundTripper : config .NewBasicAuthRoundTripper ("myuser" , "mytoken" , "" , "" , promapi .DefaultRoundTripper ),
178
- wantErr : true ,
179
- errorStr : "not found" ,
178
+ wantErr : true ,
179
+ errorStr : "not found" ,
180
180
},
181
181
{
182
182
name : "TestInsecureSkipTlsVerifyEnabled" ,
0 commit comments