File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
cmd/nvidia-ctk-installer/container/runtime/crio Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ func TestCrioConfigLifecycle(t *testing.T) {
8888 },
8989 assertCleanupPostConditions : func (t * testing.T , co * container.Options , _ * Options ) error {
9090 require .NoFileExists (t , co .TopLevelConfigPath )
91- require .NoFileExists (t , co .DropInConfig )
9291 return nil
9392 },
9493 },
@@ -182,8 +181,6 @@ signature_policy = "/etc/crio/policy.json"
182181 assertCleanupPostConditions : func (t * testing.T , co * container.Options , o * Options ) error {
183182 require .FileExists (t , co .TopLevelConfigPath )
184183
185- require .NoFileExists (t , co .DropInConfig )
186-
187184 actualTopLevel , err := os .ReadFile (co .TopLevelConfigPath )
188185 require .NoError (t , err )
189186
@@ -480,8 +477,6 @@ plugin_dirs = [
480477`
481478 require .Equal (t , expected , string (actual ))
482479
483- require .NoFileExists (t , co .DropInConfig )
484-
485480 return nil
486481 },
487482 },
Original file line number Diff line number Diff line change @@ -180,6 +180,10 @@ func cleanupHook(co *Options) error {
180180
181181// cleanupConfig removes the NVIDIA container runtime from the cri-o config
182182func cleanupConfig (o * container.Options ) error {
183+ if ! o .SetAsDefault {
184+ return nil
185+ }
186+
183187 log .Infof ("Reverting config file modifications" )
184188
185189 cfg , err := getRuntimeConfig (o )
You can’t perform that action at this time.
0 commit comments