mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
daemon/config: New(): initialize config with platform-specific defaults
This centralizes more defaults, to be part of the config struct that's created, instead of interweaving the defaults with other code in various places. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
724feb898f
commit
b28e66cf4f
12 changed files with 102 additions and 106 deletions
|
@ -24,7 +24,10 @@ func TestGetRuntime(t *testing.T) {
|
|||
const configuredRtName = "my/custom.shim.v1"
|
||||
configuredRuntime := types.Runtime{Path: "/bin/true"}
|
||||
|
||||
d := &Daemon{configStore: config.New()}
|
||||
cfg, err := config.New()
|
||||
assert.NilError(t, err)
|
||||
|
||||
d := &Daemon{configStore: cfg}
|
||||
d.configStore.Root = t.TempDir()
|
||||
assert.Assert(t, os.Mkdir(filepath.Join(d.configStore.Root, "runtimes"), 0700))
|
||||
d.configStore.Runtimes = map[string]types.Runtime{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue