mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct/configs: add HookList.SetDefaultEnv
1. Make CommandHook.Command a pointer, which reduces the amount of data being copied when using hooks, and allows to modify command hooks. 2. Add SetDefaultEnv, which is to be used by the next commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -31,14 +31,14 @@ func TestFactoryLoadContainer(t *testing.T) {
|
||||
id = "1"
|
||||
expectedHooks = configs.Hooks{
|
||||
configs.Prestart: configs.HookList{
|
||||
configs.CommandHook{Command: configs.Command{Path: "prestart-hook"}},
|
||||
configs.CommandHook{Command: &configs.Command{Path: "prestart-hook"}},
|
||||
},
|
||||
configs.Poststart: configs.HookList{
|
||||
configs.CommandHook{Command: configs.Command{Path: "poststart-hook"}},
|
||||
configs.CommandHook{Command: &configs.Command{Path: "poststart-hook"}},
|
||||
},
|
||||
configs.Poststop: configs.HookList{
|
||||
unserializableHook{},
|
||||
configs.CommandHook{Command: configs.Command{Path: "poststop-hook"}},
|
||||
configs.CommandHook{Command: &configs.Command{Path: "poststop-hook"}},
|
||||
},
|
||||
}
|
||||
expectedConfig = &configs.Config{
|
||||
|
||||
Reference in New Issue
Block a user