@@ -41,15 +41,8 @@ func TestLDCacheUpdateHook(t *testing.T) {
4141 expectedHooks []Hook
4242 }{
4343 {
44- description : "empty mounts" ,
45- expectedHooks : []Hook {
46- {
47- Lifecycle : "createContainer" ,
48- Path : testNvidiaCDIHookPath ,
49- Args : []string {"nvidia-cdi-hook" , "update-ldcache" },
50- Env : []string {"NVIDIA_CTK_DEBUG=false" },
51- },
52- },
44+ description : "empty mounts" ,
45+ expectedHooks : nil ,
5346 },
5447 {
5548 description : "mount error" ,
@@ -101,11 +94,16 @@ func TestLDCacheUpdateHook(t *testing.T) {
10194 {
10295 description : "explicit ldconfig path is passed" ,
10396 ldconfigPath : testLdconfigPath ,
97+ mounts : []Mount {
98+ {
99+ Path : "/usr/local/lib/libfoo.so" ,
100+ },
101+ },
104102 expectedHooks : []Hook {
105103 {
106104 Lifecycle : "createContainer" ,
107105 Path : testNvidiaCDIHookPath ,
108- Args : []string {"nvidia-cdi-hook" , "update-ldcache" , "--ldconfig-path" , testLdconfigPath },
106+ Args : []string {"nvidia-cdi-hook" , "update-ldcache" , "--ldconfig-path" , testLdconfigPath , "--folder" , "/usr/local/lib" },
109107 Env : []string {"NVIDIA_CTK_DEBUG=false" },
110108 },
111109 },
0 commit comments