Chore: Remove public vars in setting package (#81018)
Removes the public variable setting.SecretKey plus some other ones. Introduces some new functions for creating setting.Cfg.
This commit is contained in:
@@ -608,7 +608,7 @@ func TestService_GetHttpTransport(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
setting.SecretKey = "password"
|
||||
cfg.SecretKey = "password"
|
||||
|
||||
sjson := simplejson.New()
|
||||
sjson.Set("tlsAuthWithCACert", true)
|
||||
@@ -659,7 +659,7 @@ func TestService_GetHttpTransport(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
setting.SecretKey = "password"
|
||||
cfg.SecretKey = "password"
|
||||
|
||||
sjson := simplejson.New()
|
||||
sjson.Set("tlsAuth", true)
|
||||
@@ -706,7 +706,7 @@ func TestService_GetHttpTransport(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
setting.SecretKey = "password"
|
||||
cfg.SecretKey = "password"
|
||||
|
||||
sjson := simplejson.New()
|
||||
sjson.Set("tlsAuthWithCACert", true)
|
||||
@@ -968,10 +968,10 @@ func TestService_GetHttpTransport(t *testing.T) {
|
||||
},
|
||||
})
|
||||
|
||||
origSigV4Enabled := setting.SigV4AuthEnabled
|
||||
setting.SigV4AuthEnabled = true
|
||||
origSigV4Enabled := cfg.SigV4AuthEnabled
|
||||
cfg.SigV4AuthEnabled = true
|
||||
t.Cleanup(func() {
|
||||
setting.SigV4AuthEnabled = origSigV4Enabled
|
||||
cfg.SigV4AuthEnabled = origSigV4Enabled
|
||||
})
|
||||
|
||||
sjson, err := simplejson.NewJson([]byte(`{ "sigV4Auth": true }`))
|
||||
|
||||
Reference in New Issue
Block a user