@@ -1214,91 +1214,6 @@ func TestHttpSettingsValidate(t *testing.T) {
1214
1214
},
1215
1215
expectError : false ,
1216
1216
},
1217
- "secret manager enabled with valid bearer token" : {
1218
- input : HttpSettings {
1219
- SecretManagerEnabled : true ,
1220
- BearerToken : "plaintext:valid-token" ,
1221
- },
1222
- expectError : false ,
1223
- },
1224
- "secret manager enabled with gsm bearer token" : {
1225
- input : HttpSettings {
1226
- SecretManagerEnabled : true ,
1227
- BearerToken : "gsm:my-bearer-token" ,
1228
- },
1229
- expectError : false ,
1230
- },
1231
- "secret manager enabled with empty bearer token" : {
1232
- input : HttpSettings {
1233
- SecretManagerEnabled : true ,
1234
- BearerToken : "" ,
1235
- },
1236
- expectError : false ,
1237
- },
1238
- "secret manager enabled with invalid bearer token" : {
1239
- input : HttpSettings {
1240
- SecretManagerEnabled : true ,
1241
- BearerToken : "invalid-token" ,
1242
- },
1243
- expectError : true ,
1244
- },
1245
- "secret manager enabled with valid basic auth password" : {
1246
- input : HttpSettings {
1247
- SecretManagerEnabled : true ,
1248
- BasicAuth : & BasicAuth {
1249
- Username : "user" ,
1250
- Password : "plaintext:valid-password" ,
1251
- },
1252
- },
1253
- expectError : false ,
1254
- },
1255
- "secret manager enabled with gsm basic auth password" : {
1256
- input : HttpSettings {
1257
- SecretManagerEnabled : true ,
1258
- BasicAuth : & BasicAuth {
1259
- Username : "user" ,
1260
- Password : "gsm:my-password" ,
1261
- },
1262
- },
1263
- expectError : false ,
1264
- },
1265
- "secret manager enabled with empty basic auth password" : {
1266
- input : HttpSettings {
1267
- SecretManagerEnabled : true ,
1268
- BasicAuth : & BasicAuth {
1269
- Username : "user" ,
1270
- Password : "" ,
1271
- },
1272
- },
1273
- expectError : false ,
1274
- },
1275
- "secret manager enabled with invalid basic auth password" : {
1276
- input : HttpSettings {
1277
- SecretManagerEnabled : true ,
1278
- BasicAuth : & BasicAuth {
1279
- Username : "user" ,
1280
- Password : "invalid-password" ,
1281
- },
1282
- },
1283
- expectError : true ,
1284
- },
1285
- "secret manager disabled with invalid bearer token" : {
1286
- input : HttpSettings {
1287
- SecretManagerEnabled : false ,
1288
- BearerToken : "invalid-token" ,
1289
- },
1290
- expectError : false ,
1291
- },
1292
- "secret manager disabled with invalid basic auth password" : {
1293
- input : HttpSettings {
1294
- SecretManagerEnabled : false ,
1295
- BasicAuth : & BasicAuth {
1296
- Username : "user" ,
1297
- Password : "invalid-password" ,
1298
- },
1299
- },
1300
- expectError : false ,
1301
- },
1302
1217
}
1303
1218
1304
1219
for name , testcase := range testcases {
0 commit comments