Populate config error in three node test function

This commit is contained in:
Jeff Mitchell 2017-11-10 17:44:25 -05:00
parent 93c5d288d2
commit 8171eedc25
2 changed files with 5 additions and 2 deletions

View file

@ -116,12 +116,12 @@ func DefaultConfig() *Config {
}
if err := http2.ConfigureTransport(transport); err != nil {
config.Error = err
return nil
return config
}
if err := config.ReadEnvironment(); err != nil {
config.Error = err
return nil
return config
}
// Ensure redirects are not automatically followed

View file

@ -1275,6 +1275,9 @@ func NewTestCluster(t testing.T, base *CoreConfig, opts *TestClusterOptions) *Te
},
}
config := api.DefaultConfig()
if config.Error != nil {
t.Fatal(config.Error)
}
config.Address = fmt.Sprintf("https://127.0.0.1:%d", port)
config.HttpClient = client
apiClient, err := api.NewClient(config)