4
4
"fmt"
5
5
"io/ioutil"
6
6
"net/http"
7
+ "os"
7
8
"path/filepath"
8
9
"strings"
9
10
"testing"
@@ -28,15 +29,28 @@ func TestSeparateEDnode(t *testing.T) {
28
29
var body []byte
29
30
var err error
30
31
32
+ imageRepo , repoPres := os .LookupEnv ("dockerRepository" )
33
+ imageTag , tagPres := os .LookupEnv ("dockerVersion" )
34
+
35
+ if ! repoPres {
36
+ imageRepo = "marklogic-centos/marklogic-server-centos"
37
+ t .Logf ("No imageRepo variable present, setting to default value: " + imageRepo )
38
+ }
39
+
40
+ if ! tagPres {
41
+ imageTag = "10-internal"
42
+ t .Logf ("No imageTag variable present, setting to default value: " + imageTag )
43
+ }
44
+
31
45
namespaceName := "marklogic-" + strings .ToLower (random .UniqueId ())
32
46
kubectlOptions := k8s .NewKubectlOptions ("" , "" , namespaceName )
33
47
options := & helm.Options {
34
48
KubectlOptions : kubectlOptions ,
35
49
SetValues : map [string ]string {
36
50
"persistence.enabled" : "false" ,
37
51
"replicaCount" : "1" ,
38
- "image.repository" : "marklogic-centos/marklogic-server-centos" ,
39
- "image.tag" : "10-internal" ,
52
+ "image.repository" : imageRepo ,
53
+ "image.tag" : imageTag ,
40
54
"auth.adminUsername" : username ,
41
55
"auth.adminPassword" : password ,
42
56
"group.name" : "dnode" ,
@@ -91,8 +105,8 @@ func TestSeparateEDnode(t *testing.T) {
91
105
SetValues : map [string ]string {
92
106
"persistence.enabled" : "false" ,
93
107
"replicaCount" : "2" ,
94
- "image.repository" : "marklogic-centos/marklogic-server-centos" ,
95
- "image.tag" : "10-internal" ,
108
+ "image.repository" : imageRepo ,
109
+ "image.tag" : imageTag ,
96
110
"auth.adminUsername" : username ,
97
111
"auth.adminPassword" : password ,
98
112
"group.name" : "enode" ,
0 commit comments