fix servicemesh options nil bug
This commit is contained in:
@@ -91,7 +91,7 @@ func Load() error {
|
||||
}
|
||||
}
|
||||
|
||||
conf := &Config{}
|
||||
conf := newConfig()
|
||||
if err := viper.Unmarshal(conf); err != nil {
|
||||
klog.Error(fmt.Errorf("error unmarshal configuration %v", err))
|
||||
return err
|
||||
|
||||
@@ -70,8 +70,8 @@ func newTestConfig() *Config {
|
||||
},
|
||||
S3Options: &s2is3.S3Options{
|
||||
Endpoint: "http://minio.openpitrix-system.svc",
|
||||
Region: "us-east-1",
|
||||
DisableSSL: true,
|
||||
Region: "",
|
||||
DisableSSL: false,
|
||||
ForcePathStyle: false,
|
||||
AccessKeyID: "ABCDEFGHIJKLMN",
|
||||
SecretAccessKey: "OPQRSTUVWXYZ",
|
||||
@@ -137,7 +137,7 @@ func cleanTestConfig(t *testing.T) {
|
||||
func TestGet(t *testing.T) {
|
||||
conf := newTestConfig()
|
||||
saveTestConfig(t, conf)
|
||||
//defer cleanTestConfig(t)
|
||||
defer cleanTestConfig(t)
|
||||
|
||||
err := Load()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user