diff options
author | 2019-04-23 02:02:41 +0000 | |
---|---|---|
committer | 2019-04-23 02:02:42 +0000 | |
commit | a767721c447a624cebdec811795475fd5345b9ff (patch) | |
tree | 6ef6f81aba957dc4aba1f7311fb1a18cd07c08f0 /src/k8splugin/internal/app/instance_test.go | |
parent | ce36e99a466993bdbbfba8a235db52e565da3340 (diff) | |
parent | 42f8f006ab01692d7de9cecc06521eaf58743c0d (diff) |
Merge "Move configuration into config files"
Diffstat (limited to 'src/k8splugin/internal/app/instance_test.go')
-rw-r--r-- | src/k8splugin/internal/app/instance_test.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/k8splugin/internal/app/instance_test.go b/src/k8splugin/internal/app/instance_test.go index 3828ed38..ab39dfb7 100644 --- a/src/k8splugin/internal/app/instance_test.go +++ b/src/k8splugin/internal/app/instance_test.go @@ -15,11 +15,11 @@ package app import ( "log" - "os" "reflect" "testing" utils "k8splugin/internal" + "k8splugin/internal/config" "k8splugin/internal/db" "k8splugin/internal/helm" "k8splugin/internal/rb" @@ -153,14 +153,10 @@ func TestInstanceCreate(t *testing.T) { RBName: "test-rbdef", RBVersion: "v1", ProfileName: "profile1", - CloudRegion: "mock_config", - } - - err := os.Setenv("KUBE_CONFIG_DIR", "../../mock_files/mock_configs") - if err != nil { - t.Fatalf("TestInstanceCreate returned an error (%s)", err) + CloudRegion: "mock_kube_config", } + config.SetConfigValue("KubeConfigDir", "../../mock_files/mock_configs") ir, err := ic.Create(input) if err != nil { t.Fatalf("TestInstanceCreate returned an error (%s)", err) @@ -326,7 +322,7 @@ func TestInstanceDelete(t *testing.T) { "namespace":"testnamespace", "rb-name":"test-rbdef", "rb-version":"v1", - "cloud-region":"mock_config", + "cloud-region":"mock_kube_config", "resources": [ { "GVK": { @@ -369,7 +365,7 @@ func TestInstanceDelete(t *testing.T) { "namespace":"testnamespace", "rb-name":"test-rbdef", "rb-version":"v1", - "cloud-region":"mock_config", + "cloud-region":"mock_kube_config", "resources": [ { "GVK": { |