@@ -27,18 +27,30 @@ func TestTLSEnabledWithSelfSigned(t *testing.T) {
27
27
if e != nil {
28
28
t .Fatalf (e .Error ())
29
29
}
30
+ imageRepo , repoPres := os .LookupEnv ("dockerRepository" )
31
+ imageTag , tagPres := os .LookupEnv ("dockerVersion" )
30
32
username := "admin"
31
33
password := "admin"
32
34
35
+ if ! repoPres {
36
+ imageRepo = "marklogicdb/marklogic-db"
37
+ t .Logf ("No imageRepo variable present, setting to default value: " + imageRepo )
38
+ }
39
+
40
+ if ! tagPres {
41
+ imageTag = "latest"
42
+ t .Logf ("No imageTag variable present, setting to default value: " + imageTag )
43
+ }
44
+
33
45
namespaceName := "marklogic-" + strings .ToLower (random .UniqueId ())
34
46
kubectlOptions := k8s .NewKubectlOptions ("" , "" , namespaceName )
35
47
options := & helm.Options {
36
48
KubectlOptions : kubectlOptions ,
37
49
SetValues : map [string ]string {
38
50
"persistence.enabled" : "false" ,
39
51
"replicaCount" : "1" ,
40
- "image.repository" : "marklogicdb/marklogic-db" ,
41
- "image.tag" : "latest" ,
52
+ "image.repository" : imageRepo ,
53
+ "image.tag" : imageTag ,
42
54
"auth.adminUsername" : username ,
43
55
"auth.adminPassword" : password ,
44
56
"logCollection.enabled" : "false" ,
@@ -131,10 +143,25 @@ func TestTLSEnabledWithNamedCert(t *testing.T) {
131
143
namespaceName := "marklogic-" + "tlsnamed"
132
144
kubectlOptions := k8s .NewKubectlOptions ("" , "" , namespaceName )
133
145
var err error
146
+ imageRepo , repoPres := os .LookupEnv ("dockerRepository" )
147
+ imageTag , tagPres := os .LookupEnv ("dockerVersion" )
148
+ if ! repoPres {
149
+ imageRepo = "marklogicdb/marklogic-db"
150
+ t .Logf ("No imageRepo variable present, setting to default value: " + imageRepo )
151
+ }
152
+
153
+ if ! tagPres {
154
+ imageTag = "latest"
155
+ t .Logf ("No imageTag variable present, setting to default value: " + imageTag )
156
+ }
134
157
135
158
// Setup the args for helm install using custom values.yaml file
136
159
options := & helm.Options {
137
- ValuesFiles : []string {"../test_data/values/tls_twonode_values.yaml" },
160
+ ValuesFiles : []string {"../test_data/values/tls_twonode_values.yaml" },
161
+ SetValues : map [string ]string {
162
+ "image.repository" : imageRepo ,
163
+ "image.tag" : imageTag ,
164
+ },
138
165
KubectlOptions : k8s .NewKubectlOptions ("" , "" , namespaceName ),
139
166
}
140
167
@@ -316,17 +343,21 @@ func TestTlsOnEDnode(t *testing.T) {
316
343
}
317
344
318
345
if ! repoPres {
319
- imageRepo = "marklogic-centos /marklogic-server-centos "
346
+ imageRepo = "marklogicdb /marklogic-db "
320
347
t .Logf ("No imageRepo variable present, setting to default value: " + imageRepo )
321
348
}
322
349
323
350
if ! tagPres {
324
- imageTag = "10-internal "
351
+ imageTag = "latest "
325
352
t .Logf ("No imageTag variable present, setting to default value: " + imageTag )
326
353
}
327
354
328
355
options := & helm.Options {
329
- ValuesFiles : []string {"../test_data/values/tls_dnode_values.yaml" },
356
+ ValuesFiles : []string {"../test_data/values/tls_dnode_values.yaml" },
357
+ SetValues : map [string ]string {
358
+ "image.repository" : imageRepo ,
359
+ "image.tag" : imageTag ,
360
+ },
330
361
KubectlOptions : k8s .NewKubectlOptions ("" , "" , namespaceName ),
331
362
}
332
363
@@ -415,7 +446,11 @@ func TestTlsOnEDnode(t *testing.T) {
415
446
416
447
enodeOptions := & helm.Options {
417
448
KubectlOptions : kubectlOptions ,
418
- ValuesFiles : []string {"../test_data/values/tls_enode_values.yaml" },
449
+ SetValues : map [string ]string {
450
+ "image.repository" : imageRepo ,
451
+ "image.tag" : imageTag ,
452
+ },
453
+ ValuesFiles : []string {"../test_data/values/tls_enode_values.yaml" },
419
454
}
420
455
421
456
//generate certificates for enode pod zero
@@ -440,7 +475,7 @@ func TestTlsOnEDnode(t *testing.T) {
440
475
helm .Install (t , enodeOptions , helmChartPath , enodeReleaseName )
441
476
442
477
// wait until the first enode pod is in Ready status
443
- k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName0 , 45 , 20 * time .Second )
478
+ k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName0 , 20 , 20 * time .Second )
444
479
445
480
t .Log ("====Verify xdqp-ssl-enabled is set to false on Enode" )
446
481
resp , err = client .R ().
@@ -473,7 +508,7 @@ func TestTlsOnEDnode(t *testing.T) {
473
508
}
474
509
475
510
// wait until the second enode pod is in Ready status
476
- k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName1 , 45 , 20 * time .Second )
511
+ k8s .WaitUntilPodAvailable (t , kubectlOptions , enodePodName1 , 20 , 20 * time .Second )
477
512
478
513
t .Log ("====Verifying two hosts joined enode group" )
479
514
enodeHostCount := 0
0 commit comments