diff --git a/pkg/volume/csi/csi_attacher_test.go b/pkg/volume/csi/csi_attacher_test.go index e31cecfa6f0..cfa9aa2b8b3 100644 --- a/pkg/volume/csi/csi_attacher_test.go +++ b/pkg/volume/csi/csi_attacher_test.go @@ -541,6 +541,10 @@ func TestAttacherMountDevice(t *testing.T) { csiAttacher := attacher.(*csiAttacher) csiAttacher.csiClient = setupClient(t, tc.stageUnstageSet) + if tc.deviceMountPath != "" { + tc.deviceMountPath = filepath.Join(tmpDir, tc.deviceMountPath) + } + nodeName := string(csiAttacher.plugin.host.GetNodeName()) // Create spec