Skip to content

Commit c8a1809

Browse files
committed
fixup! USE Matchers
Signed-off-by: Evan Lezar <[email protected]>
1 parent e4792c2 commit c8a1809

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

tests/e2e/nvidia-ctk_containerd_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -614,18 +614,8 @@ func getPluginConfig(tree *toml.Tree, version int64) (*toml.Tree, error) {
614614
}
615615

616616
// getRuntimesConfig gets the runtimes configuration from the plugin config
617-
func getRuntimesConfig(pluginConfig *toml.Tree, _ int64) (map[string]interface{}, error) {
618-
containerdSection := pluginConfig.Get("containerd")
619-
if containerdSection == nil {
620-
return nil, fmt.Errorf("containerd section not found")
621-
}
622-
623-
containerdTree, ok := containerdSection.(*toml.Tree)
624-
if !ok {
625-
return nil, fmt.Errorf("containerd section is not a TOML tree")
626-
}
627-
628-
runtimes := containerdTree.Get("runtimes")
617+
func getRuntimesConfig(pluginConfig *toml.Tree) (map[string]interface{}, error) {
618+
runtimes := pluginConfig.GetPath([]string{"containerd", "runtimes"})
629619
if runtimes == nil {
630620
return nil, fmt.Errorf("runtimes section not found")
631621
}

0 commit comments

Comments
 (0)