Skip to content

Commit 5285665

Browse files
committed
test: resolve inventory DB interface mock conflicts in test suites
1 parent 061ca24 commit 5285665

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/driver/nri_hooks_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,10 @@ func TestStopPodSandboxRescanGating(t *testing.T) {
628628
np.podConfigStore.SetDeviceConfig(podUID, "eth0", tc.deviceConfig)
629629
}
630630
if tc.setupNetNs {
631-
netdb.AddPodNetNs(podKey(pod), "/dummy/netns")
631+
if !tc.setupDeviceConfig {
632+
np.podConfigStore.SetDeviceConfig(podUID, "dummy-dev", DeviceConfig{})
633+
}
634+
np.podConfigStore.SetPodNetNs(podUID, "/dummy/netns")
632635
}
633636

634637
if err := np.StopPodSandbox(context.Background(), pod); err != nil {

0 commit comments

Comments
 (0)