mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #43458 from thaJeztah/fix_daemon_config_test
daemon/config: fix TestReloadDefaultConfigNotExist if file exists
This commit is contained in:
commit
7ea283fd91
1 changed files with 3 additions and 3 deletions
|
@ -446,10 +446,10 @@ func TestReloadSetConfigFileNotExist(t *testing.T) {
|
|||
func TestReloadDefaultConfigNotExist(t *testing.T) {
|
||||
skip.If(t, os.Getuid() != 0, "skipping test that requires root")
|
||||
reloaded := false
|
||||
configFile := "/etc/docker/daemon.json"
|
||||
defaultConfigFile := "/tmp/blabla/not/exists/daemon.json"
|
||||
flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
|
||||
flags.String("config-file", configFile, "")
|
||||
err := Reload(configFile, flags, func(c *Config) {
|
||||
flags.String("config-file", defaultConfigFile, "")
|
||||
err := Reload(defaultConfigFile, flags, func(c *Config) {
|
||||
reloaded = true
|
||||
})
|
||||
assert.Check(t, err)
|
||||
|
|
Loading…
Reference in a new issue