Skip to content

Commit d731ec7

Browse files
committed
Merge branch 'OWLS-122349-port' into 'main'
Add WLS domain on pv upgrade tests See merge request weblogic-cloud/weblogic-kubernetes-operator!4848
2 parents f963142 + 3844075 commit d731ec7

File tree

3 files changed

+202
-109
lines changed

3 files changed

+202
-109
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItOperatorUpgradeWithIstio.java

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
/**
7373
* Install a released version of Operator from GitHub chart repository.
7474
* Create a domain using Model-In-Image model with a dynamic cluster.
75-
* Configure Itsio on the domain resource with v8 schema
75+
* Configure Itsio on the domain resource with v9 schema
7676
* Make sure the console is accessible thru istio ingress port
7777
* Upgrade operator with current Operator image build from current branch.
7878
* Make sure the console is accessible thru istio ingress port
@@ -118,35 +118,35 @@ public void beforeEach(@Namespaces(2) List<String> namespaces) {
118118
}
119119

120120
/**
121-
* Upgrade from Operator 3.4.3 to current with Istio enabled domain.
121+
* Upgrade from Operator 4.0.9 to current with Istio enabled domain.
122122
*/
123123
@Test
124-
@DisplayName("Upgrade 3.4.3 Istio Domain(v8) with Istio to current")
125-
void testOperatorWlsIstioDomainUpgradeFrom343ToCurrent() {
126-
logger.info("Starting testOperatorWlsIstioDomainUpgradeFrom343ToCurrent"
127-
+ " to upgrade Istio Image Domain with Istio with v8 schema to current");
128-
upgradeWlsIstioDomain("3.4.3");
124+
@DisplayName("Upgrade 4.0.9 Istio Domain with Istio to current")
125+
void testOperatorWlsIstioDomainUpgradeFrom409ToCurrent() {
126+
logger.info("Starting testOperatorWlsIstioDomainUpgradeFrom409ToCurrent"
127+
+ " to upgrade Istio Image Domain with Istio with v9 schema to current");
128+
upgradeWlsIstioDomain("4.0.9");
129129
}
130130

131131
/**
132-
* Upgrade from Operator 3.4.4 to current with Istio enabled domain.
132+
* Upgrade from Operator 4.1.7 to current with Istio enabled domain.
133133
*/
134134
@Test
135-
@DisplayName("Upgrade 3.4.4 Istio Domain(v8) with Istio to current")
136-
void testOperatorWlsIstioDomainUpgradeFrom344ToCurrent() {
137-
logger.info("Starting testOperatorWlsIstioDomainUpgradeFrom344ToCurrent"
138-
+ " to upgrade Istio Image Domain with Istio with v8 schema to current");
139-
upgradeWlsIstioDomain("3.4.4");
135+
@DisplayName("Upgrade 4.1.7 Istio Domain(v9) with Istio to current")
136+
void testOperatorWlsIstioDomainUpgradeFrom417ToCurrent() {
137+
logger.info("Starting testOperatorWlsIstioDomainUpgradeFrom417ToCurrent"
138+
+ " to upgrade Istio Image Domain with Istio with v9 schema to current");
139+
upgradeWlsIstioDomain("4.1.7");
140140
}
141141

142142
/**
143-
* Upgrade from Operator v3.3.8 to current with Istio enabled domain.
143+
* Upgrade from Operator v4.2.6 to current with Istio enabled domain.
144144
*/
145145
@Test
146-
@DisplayName("Upgrade 3.3.8 Istio Domain(v8) with Istio to current")
147-
void testOperatorWlsIstioDomainUpgradeFrom338ToCurrent() {
148-
logger.info("Starting test to upgrade Istio Image Domain with Istio with v8 schema to current");
149-
upgradeWlsIstioDomain("3.3.8");
146+
@DisplayName("Upgrade 4.2.6 Istio Domain with Istio to current")
147+
void testOperatorWlsIstioDomainUpgradeFrom426ToCurrent() {
148+
logger.info("Starting test to upgrade Istio Image Domain with Istio with v9 schema to current");
149+
upgradeWlsIstioDomain("4.2.6");
150150
}
151151

152152
/**
@@ -162,24 +162,24 @@ public void tearDown() {
162162
}
163163

164164
void upgradeWlsIstioDomain(String oldVersion) {
165-
logger.info("Upgrade version/{0} Istio Domain(v8) to current", oldVersion);
166-
installOldOperator(oldVersion,opNamespace,domainNamespace);
165+
logger.info("Upgrade version/{0} Istio Domain to current", oldVersion);
166+
installOldOperator(oldVersion, opNamespace, domainNamespace);
167167
createSecrets();
168168

169169
// Create the repo secret to pull base WebLogic image
170170
createBaseRepoSecret(domainNamespace);
171171
createConfigMapAndVerify("istio-upgrade-configmap",
172172
domainUid, domainNamespace, Collections.emptyList());
173173

174-
// Creating an MII domain with v8 version
175-
// Generate a v8 version of domain.yaml file from a template file
174+
// Creating an MII domain with v9 version
175+
// Generate a v9 version of domain.yaml file from a template file
176176
// by replacing domain namespace, domain uid, image
177177
Map<String, String> templateMap = new HashMap<>();
178178
templateMap.put("DOMAIN_NS", domainNamespace);
179179
templateMap.put("DOMAIN_UID", domainUid);
180180
templateMap.put("MII_IMAGE",
181181
MII_BASIC_IMAGE_NAME + ":" + MII_BASIC_IMAGE_TAG);
182-
templateMap.put("API_VERSION", "v8");
182+
templateMap.put("API_VERSION", "v9");
183183
Path srcDomainFile = Paths.get(RESOURCE_DIR,
184184
"upgrade", "istio.config.template.yaml");
185185
Path targetDomainFile = assertDoesNotThrow(
@@ -198,7 +198,7 @@ void upgradeWlsIstioDomain(String oldVersion) {
198198
// wait for the domain to exist
199199
logger.info("Checking for domain custom resource in namespace {0}", domainNamespace);
200200
testUntil(
201-
domainExists(domainUid, "v8", domainNamespace),
201+
domainExists(domainUid, "v9", domainNamespace),
202202
logger,
203203
"domain {0} to be created in namespace {1}",
204204
domainUid,
@@ -214,8 +214,6 @@ void upgradeWlsIstioDomain(String oldVersion) {
214214
// before upgrading to Latest
215215
verifyDomainStatusConditionTypeDoesNotExist(domainUid, domainNamespace,
216216
DOMAIN_STATUS_CONDITION_COMPLETED_TYPE, OLD_DOMAIN_VERSION);
217-
istioIngressPort =
218-
createIstioService(domainUid,clusterName,adminServerPodName,domainNamespace);
219217
istioIngressPort
220218
= createIstioService(domainUid, clusterName, adminServerPodName, domainNamespace);
221219
String istioHost = null;
@@ -231,10 +229,10 @@ void upgradeWlsIstioDomain(String oldVersion) {
231229
}
232230
checkIstioService(istioHost, istioIngressPort, domainNamespace);
233231
upgradeOperatorToCurrent(opNamespace);
234-
checkDomainStatus(domainNamespace,domainUid);
232+
checkDomainStatus(domainNamespace, domainUid);
235233
verifyPodsNotRolled(domainNamespace, pods);
236234
// Re check the istio Service After Upgrade
237-
checkIstioService(istioHost, istioIngressPort,domainNamespace);
235+
checkIstioService(istioHost, istioIngressPort, domainNamespace);
238236
}
239237

240238
private void createSecrets() {

0 commit comments

Comments
 (0)