fix servicemesh options nil bug

This commit is contained in:
Jeff
2019-09-25 01:16:13 +08:00
committed by zryfish
parent 284c0d6425
commit d0dc66cf28
16 changed files with 48 additions and 105 deletions

View File

@@ -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

View File

@@ -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 {