From 1d7451547d61f2a4fbeae9f85bf1310c1aa277bd Mon Sep 17 00:00:00 2001 From: Manuel Kieweg <manuel.kieweg@h-da.de> Date: Fri, 26 Mar 2021 16:35:26 +0000 Subject: [PATCH] fixed resource invalidation --- nucleus/controller.go | 11 ++--------- nucleus/http_test.go | 6 ------ 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/nucleus/controller.go b/nucleus/controller.go index f9e2b6dd9..362358f37 100644 --- a/nucleus/controller.go +++ b/nucleus/controller.go @@ -27,8 +27,8 @@ var c *Core func init() { c = &Core{ database: database.Database{}, - pndc: pndStore{}, - sbic: sbiStore{}, + pndc: pndStore{store{}}, + sbic: sbiStore{store{}}, stopChan: make(chan os.Signal, 1), } @@ -38,13 +38,6 @@ func init() { // initialize does start-up housekeeping like reading controller config files func initialize() error { - c.sbic = sbiStore{ - store{}, - } - c.pndc = pndStore{ - store{}, - } - if err := createSouthboundInterfaces(); err != nil { return err } diff --git a/nucleus/http_test.go b/nucleus/http_test.go index 87e744773..9da520a24 100644 --- a/nucleus/http_test.go +++ b/nucleus/http_test.go @@ -11,7 +11,6 @@ import ( ) func testSetupHttp() { - testSetupPnd() sbi = &OpenConfig{id: defaultSbiID} sbi.Schema() var err error @@ -31,11 +30,6 @@ func testSetupHttp() { } args = "&uuid=" + mdid.String() + "&pnd=" + defaultPndID.String() + "&sbi=" + defaultSbiID.String() argsNotFound = "&uuid=" + uuid.New().String() + "&pnd=" + defaultPndID.String() + "&sbi=" + defaultSbiID.String() - - c = &Core{ - pndc: pndStore{store{}}, - sbic: sbiStore{store{}}, - } if err := c.sbic.add(sbi); err != nil { log.Fatal(err) } -- GitLab