Skip to content

Commit 9adfe1a

Browse files
authored
Consolidate happy path sample tests (#1620)
* Consolidate the ItSimpleDomainValidation.java ItSimpleOperatorValidation.java and ItWitValidation.java into a single file * order the tests * fix operator ready assertion * Revert "fix operator ready assertion" This reverts commit a28cc6d. * use the new operatorReady api * Address review comments * fix comment * Remove ItWitValidation test * Adding the domainNamespace1 to the list of domains under operator * added secret name in op params
1 parent 1ed92fc commit 9adfe1a

File tree

6 files changed

+293
-409
lines changed

6 files changed

+293
-409
lines changed

new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiDomain.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ class ItMiiDomain implements LoggedTest {
126126
private String domainUid1 = "domain2";
127127
private String miiImage = null;
128128

129+
private static Map<String, Object> secretNameMap;
130+
129131
/**
130132
* Install Operator.
131133
* @param namespaces list of namespaces created by the IntegrationTestWatcher by the
@@ -171,6 +173,7 @@ public static void initAll(@Namespaces(3) List<String> namespaces) {
171173
dockerConfigJson = dockerConfigJsonObject.toString();
172174

173175
// Create the V1Secret configuration
176+
logger.info("Creating repo secret {0}", REPO_SECRET_NAME);
174177
V1Secret repoSecret = new V1Secret()
175178
.metadata(new V1ObjectMeta()
176179
.name(REPO_SECRET_NAME)
@@ -184,7 +187,7 @@ public static void initAll(@Namespaces(3) List<String> namespaces) {
184187
REPO_SECRET_NAME, opNamespace));
185188

186189
// map with secret
187-
Map<String, Object> secretNameMap = new HashMap<String, Object>();
190+
secretNameMap = new HashMap<String, Object>();
188191
secretNameMap.put("name", REPO_SECRET_NAME);
189192
// helm install parameters
190193
opHelmParams = new HelmParams()
@@ -198,7 +201,7 @@ public static void initAll(@Namespaces(3) List<String> namespaces) {
198201
.helmParams(opHelmParams)
199202
.image(operatorImage)
200203
.imagePullSecrets(secretNameMap)
201-
.domainNamespaces(Arrays.asList(domainNamespace))
204+
.domainNamespaces(Arrays.asList(domainNamespace, domainNamespace1))
202205
.serviceAccount(serviceAccountName);
203206

204207
// install Operator
@@ -342,6 +345,7 @@ public void testCreateMiiSecondDomainDiffNSSameImage() {
342345
new OperatorParams()
343346
.helmParams(opHelmParams)
344347
.image(operatorImage)
348+
.imagePullSecrets(secretNameMap)
345349
.domainNamespaces(Arrays.asList(domainNamespace,domainNamespace1))
346350
.serviceAccount(serviceAccountName);
347351

@@ -352,6 +356,7 @@ public void testCreateMiiSecondDomainDiffNSSameImage() {
352356
logger.info("Operator upgraded in namespace {0}", opNamespace);
353357

354358
// Create the repo secret to pull the image
359+
logger.info("Creating repo secret {0}", REPO_SECRET_NAME);
355360
assertDoesNotThrow(() -> createRepoSecret(domainNamespace1),
356361
String.format("createSecret failed for %s", REPO_SECRET_NAME));
357362

@@ -370,6 +375,7 @@ public void testCreateMiiSecondDomainDiffNSSameImage() {
370375
String.format("createSecret failed for %s", encryptionSecretName));
371376

372377
// create the domain CR
378+
logger.info("Creating custom domain resource");
373379
createDomainResource(domainUid1, domainNamespace1, adminSecretName, REPO_SECRET_NAME,
374380
encryptionSecretName, replicaCount);
375381

new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItSimpleDomainValidation.java

Lines changed: 0 additions & 163 deletions
This file was deleted.

new-integration-tests/src/test/java/oracle/weblogic/kubernetes/ItSimpleOperatorValidation.java

Lines changed: 0 additions & 161 deletions
This file was deleted.

0 commit comments

Comments
 (0)