diff options
author | 2020-03-02 09:09:46 -0800 | |
---|---|---|
committer | 2020-03-05 04:58:16 -0800 | |
commit | 59ead086a9fbd61cad2187f196b1176c20f98691 (patch) | |
tree | e658558be83f56792b6071b1c520460d11371a32 /src/orchestrator/pkg/infra/db/store_test.go | |
parent | 7b566f2875230e15f79a6549b17240e767cc98f1 (diff) |
Change DB Name to accept variable
This enables the initialization of the mongo database name with
a variable.
Issue-ID: MULTICLOUD-996
Signed-off-by: Enyinna Ochulor <enyinna.ochulor@intel.com>
Change-Id: Id3f07b47cedde16235ee7078e1e6f4d287106d29
Diffstat (limited to 'src/orchestrator/pkg/infra/db/store_test.go')
-rw-r--r-- | src/orchestrator/pkg/infra/db/store_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/orchestrator/pkg/infra/db/store_test.go b/src/orchestrator/pkg/infra/db/store_test.go index 42a41787..fb23e232 100644 --- a/src/orchestrator/pkg/infra/db/store_test.go +++ b/src/orchestrator/pkg/infra/db/store_test.go @@ -23,7 +23,7 @@ func TestCreateDBClient(t *testing.T) { t.Run("Successfully create DB client", func(t *testing.T) { expected := &MongoStore{} - err := createDBClient("mongo") + err := createDBClient("mongo", "testdb") if err != nil { t.Fatalf("CreateDBClient returned an error (%s)", err) } @@ -32,7 +32,7 @@ func TestCreateDBClient(t *testing.T) { } }) t.Run("Fail to create client for unsupported DB", func(t *testing.T) { - err := createDBClient("fakeDB") + err := createDBClient("fakeDB", "testdb2") if err == nil { t.Fatal("CreateDBClient didn't return an error") } |