File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ func TestNewCSVModifier(t *testing.T) {
117117 devRoot = filepath .Join (lookupRoot , tc .devRootfs )
118118 }
119119 driver := root .New (root .WithDriverRoot (driverRoot ), root .WithDevRoot (devRoot ))
120- // TODO: We should point to the factory root here.
121- tc .cfg .NVIDIAContainerCLIConfig .Root = driverRoot
122120 // Override the CSV file search path for this root.
123121 tc .cfg .NVIDIAContainerRuntimeConfig .Modes .CSV .MountSpecPath = filepath .Join (driverRoot , "/etc/nvidia-container-runtime/host-files-for-container.d" )
124122 tc .cfg .NVIDIACTKConfig .Path = "/usr/bin/nvidia-cdi-hook"
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ func createFactory(opts ...Option) *Factory {
6262 for _ , opt := range opts {
6363 opt (f )
6464 }
65-
6665 if f .editsFactory == nil {
6766 f .editsFactory = edits .NewFactory (edits .WithLogger (f .logger ))
6867 }
@@ -71,6 +70,9 @@ func createFactory(opts ...Option) *Factory {
7170}
7271
7372func (f * Factory ) validate () error {
73+ if f .driver == nil {
74+ return fmt .Errorf ("a driver must be specified" )
75+ }
7476 switch string (f .runtimeMode ) {
7577 case "" :
7678 return fmt .Errorf ("a mode must be specified" )
You can’t perform that action at this time.
0 commit comments