@@ -181,7 +181,7 @@ func Test_cdiModeIdentfiersFromDevices(t *testing.T) {
181181 description : "empty device list" ,
182182 devices : []string {},
183183 expected : & cdiModeIdentifiers {
184- modes : [] string { "auto" } ,
184+ modes : nil ,
185185 idsByMode : map [string ][]string {},
186186 deviceClassByMode : map [string ]string {"auto" : "gpu" },
187187 },
@@ -208,7 +208,7 @@ func Test_cdiModeIdentfiersFromDevices(t *testing.T) {
208208 description : "device with explicit mode" ,
209209 devices : []string {"mode=gds,id=foo" },
210210 expected : & cdiModeIdentifiers {
211- modes : []string {"auto" , " gds" },
211+ modes : []string {"gds" },
212212 idsByMode : map [string ][]string {"gds" : {"foo" }},
213213 deviceClassByMode : map [string ]string {"auto" : "gpu" },
214214 },
@@ -231,15 +231,15 @@ func Test_cdiModeIdentfiersFromDevices(t *testing.T) {
231231 devices : []string {"mode=nvswitch" },
232232 expected : & cdiModeIdentifiers {
233233 modes : []string {"nvswitch" },
234- idsByMode : map [string ][]string {"nvswitch" : {} },
234+ idsByMode : map [string ][]string {},
235235 deviceClassByMode : map [string ]string {"auto" : "gpu" },
236236 },
237237 },
238238 {
239239 description : "duplicate modes" ,
240240 devices : []string {"mode=gds,id=x" , "mode=gds,id=y" , "mode=gds" },
241241 expected : & cdiModeIdentifiers {
242- modes : []string {"auto" , " gds" },
242+ modes : []string {"gds" },
243243 idsByMode : map [string ][]string {"gds" : {"x" , "y" }},
244244 deviceClassByMode : map [string ]string {"auto" : "gpu" },
245245 },
0 commit comments