cri: add config ut for invalid drain io timeout value
Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
parent
55e25f1644
commit
01671e9fc5
@ -383,6 +383,20 @@ func TestValidateConfig(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expectedErr: "`privileged_without_host_devices_all_devices_allowed` requires `privileged_without_host_devices` to be enabled",
|
expectedErr: "`privileged_without_host_devices_all_devices_allowed` requires `privileged_without_host_devices` to be enabled",
|
||||||
},
|
},
|
||||||
|
"invalid drain_exec_sync_io_timeout input": {
|
||||||
|
config: &PluginConfig{
|
||||||
|
ContainerdConfig: ContainerdConfig{
|
||||||
|
DefaultRuntimeName: RuntimeDefault,
|
||||||
|
Runtimes: map[string]Runtime{
|
||||||
|
RuntimeDefault: {
|
||||||
|
Type: "default",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
DrainExecSyncIOTimeout: "10",
|
||||||
|
},
|
||||||
|
expectedErr: "invalid drain exec sync io timeout: time: missing unit in duration \"10\"",
|
||||||
|
},
|
||||||
} {
|
} {
|
||||||
t.Run(desc, func(t *testing.T) {
|
t.Run(desc, func(t *testing.T) {
|
||||||
err := ValidatePluginConfig(context.Background(), test.config)
|
err := ValidatePluginConfig(context.Background(), test.config)
|
||||||
|
Loading…
Reference in New Issue
Block a user