Skip to content

Commit cce3ebe

Browse files
[no-relnote] add unit tests for cmd/nvidia-ctk/runtime/configure
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent e98dc0a commit cce3ebe

File tree

4 files changed

+626
-2
lines changed

4 files changed

+626
-2
lines changed

cmd/nvidia-ctk/runtime/configure/configure.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (m command) validateFlags(config *config) error {
250250
}
251251
}
252252

253-
if config.dropInConfigPath == "" && (config.runtime == "containerd" || config.runtime == "crio") {
253+
if config.dropInConfigPath == "" {
254254
switch config.runtime {
255255
case "containerd":
256256
config.dropInConfigPath = defaultContainerdDropInConfigFilePath
@@ -263,6 +263,10 @@ func (m command) validateFlags(config *config) error {
263263
return fmt.Errorf("the drop-in-config path %q is not an absolute path", config.dropInConfigPath)
264264
}
265265

266+
if config.dropInConfigPath != "" && config.runtime == "docker" {
267+
return fmt.Errorf("runtime %v does not support drop-in configs", config.runtime)
268+
}
269+
266270
return nil
267271
}
268272

0 commit comments

Comments
 (0)