From 8f09dbe0efb126a28c6d2d98d529c3f2527beee1 Mon Sep 17 00:00:00 2001 From: Sebastian Sch Date: Tue, 10 Dec 2024 16:53:38 +0200 Subject: [PATCH] Fix unit tests Signed-off-by: Sebastian Sch --- pkg/netdevice/netResourcePool_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/netdevice/netResourcePool_test.go b/pkg/netdevice/netResourcePool_test.go index 082bb1c50..e8d8119f7 100644 --- a/pkg/netdevice/netResourcePool_test.go +++ b/pkg/netdevice/netResourcePool_test.go @@ -149,6 +149,8 @@ var _ = Describe("NetResourcePool", func() { } return nil }) + nadutils.On("CleanDeviceInfoFile", "fakeOrg.io/fakeResource", "fake1").Return(nil) + nadutils.On("CleanDeviceInfoFile", "fakeOrg.io/fakeResource", "fake2").Return(nil) rp := netdevice.NewNetResourcePool(nadutils, rc, pcis) err := rp.StoreDeviceInfoFile("fakeOrg.io", []string{"fake1", "fake2"}) nadutils.AssertExpectations(t) @@ -216,6 +218,9 @@ var _ = Describe("NetResourcePool", func() { } return nil }) + nadutils.On("CleanDeviceInfoFile", "fakeOrg.io/fakeResource", "fake1").Return(nil) + nadutils.On("CleanDeviceInfoFile", "fakeOrg.io/fakeResource", "fake2").Return(nil) + rp := netdevice.NewNetResourcePool(nadutils, rc, pcis) err := rp.StoreDeviceInfoFile("fakeOrg.io", []string{"fake1", "fake2"}) Expect(err).ToNot(HaveOccurred())