diff --git a/controller/nucleus/pndFilesystemStore_test.go b/controller/nucleus/pndFilesystemStore_test.go index 420c9d27b69d63f22897cffb0ffdaf35fcd49a80..bc43f74c240caffc9019902716495a2e6ae061cb 100644 --- a/controller/nucleus/pndFilesystemStore_test.go +++ b/controller/nucleus/pndFilesystemStore_test.go @@ -11,10 +11,11 @@ import ( func TestAddPnd(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.PndFilename) - pndStore := NewPndStore() + pluginServiceMock := NewPluginServiceMock() + pndStore := NewPndStore(pluginServiceMock) pndID, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") - pnd, _ := NewPND("testpnd", "test", pndID, nil, nil) + pnd, _ := NewPND("testpnd", "test", pndID, nil, nil, pluginServiceMock, nil) err := pndStore.Add(pnd) @@ -26,11 +27,12 @@ func TestAddPnd(t *testing.T) { func TestGetAllPnds(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.PndFilename) - pndStore := NewPndStore() + pluginServiceMock := NewPluginServiceMock() + pndStore := NewPndStore(pluginServiceMock) pndID1, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID2, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bab") - pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil) - pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil) + pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil, pluginServiceMock, nil) + pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil, pluginServiceMock, nil) inputPnds := [2]networkdomain.NetworkDomain{pnd1, pnd2} @@ -62,11 +64,12 @@ func TestGetAllPnds(t *testing.T) { func TestGetPnd(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.PndFilename) - pndStore := NewPndStore() + pluginServiceMock := NewPluginServiceMock() + pndStore := NewPndStore(pluginServiceMock) pndID1, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID2, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bab") - pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil) - pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil) + pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil, pluginServiceMock, nil) + pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil, pluginServiceMock, nil) inputPnds := [2]networkdomain.NetworkDomain{pnd1, pnd2} @@ -96,11 +99,12 @@ func TestGetPnd(t *testing.T) { func TestDeletePnd(t *testing.T) { defer ensureStoreFileForTestsIsRemoved(store.PndFilename) - pndStore := NewPndStore() + pluginServiceMock := NewPluginServiceMock() + pndStore := NewPndStore(pluginServiceMock) pndID1, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bad") pndID2, _ := uuid.Parse("b4016412-eec5-45a1-aa29-f59915357bab") - pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil) - pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil) + pnd1, _ := NewPND("testpnd", "test", pndID1, nil, nil, pluginServiceMock, nil) + pnd2, _ := NewPND("testpnd2", "test", pndID2, nil, nil, pluginServiceMock, nil) inputPnds := [2]networkdomain.NetworkDomain{pnd1, pnd2}