Skip to content

Commit e338301

Browse files
committed
fix
1 parent b88e25e commit e338301

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ITOperatorUpgrade.java

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,20 @@ public class ITOperatorUpgrade extends BaseTest {
3535
private static final String OP_BASE_REL = "2.0";
3636
private static final String OP_TARGET_RELEASE = "weblogic-kubernetes-operator:latest";
3737
private static final String DOM_TARGET_RELEASE_VERSION = "weblogic.oracle/v4";
38-
private static String OP_NS = "weblogic-operator";
39-
private static String OP_DEP_NAME = "operator-upgrade";
40-
private static String OP_SA = "operator-sa";
41-
private static String DOM_NS = "weblogic-domain";
42-
private static String DUID = "operator20domain";
38+
private static String OP_NS = "";
39+
private static String OP_DEP_NAME = "";
40+
private static String OP_SA = "";
41+
private static String DOM_NS = "";
42+
private static String DUID = "";
4343
private static String opUpgradeTmpDir;
4444
private Domain domain = null;
45-
private static Operator operator20;
45+
private static Operator operator;
4646

4747
private void setupOperatorAndDomain(String operatorGitRelease, String operatorRelease)
4848
throws Exception {
4949
logger.log(Level.INFO, "+++++++++++++++Beginning Test Setup+++++++++++++++++++++");
50-
if (!QUICKTEST) {
51-
initialize(APP_PROPS_FILE);
52-
opUpgradeTmpDir = BaseTest.getResultDir() + "/operatorupgrade";
53-
}
50+
initialize(APP_PROPS_FILE);
51+
opUpgradeTmpDir = BaseTest.getResultDir() + "/operatorupgrade";
5452
TestUtils.exec("rm -rf " + Paths.get(opUpgradeTmpDir).toString());
5553
Files.createDirectories(Paths.get(opUpgradeTmpDir));
5654
Map<String, Object> operatorMap = TestUtils.loadYaml(OPERATOR1_YAML);
@@ -64,24 +62,18 @@ private void setupOperatorAndDomain(String operatorGitRelease, String operatorRe
6462
List<String> dom_ns = new ArrayList<String>();
6563
dom_ns.add(DOM_NS);
6664
operatorMap.put("domainNamespaces", dom_ns);
67-
operator20 = TestUtils.createOperator(operatorMap, Operator.RESTCertType.LEGACY);
65+
operator = TestUtils.createOperator(operatorMap, Operator.RESTCertType.LEGACY);
6866
TestUtils.ExecAndPrintLog("kubectl get all --all-namespaces");
6967

7068
Map<String, Object> wlstDomainMap = TestUtils.loadYaml(DOMAININIMAGE_WLST_YAML);
7169
wlstDomainMap.put("domainUID", DUID);
7270
wlstDomainMap.put("namespace", DOM_NS);
7371
wlstDomainMap.put("projectRoot", opUpgradeTmpDir + "/weblogic-kubernetes-operator");
7472
domain = TestUtils.createDomain(wlstDomainMap);
75-
Thread.sleep(1000 * 60);
7673
TestUtils.ExecAndPrintLog("kubectl get all --all-namespaces");
77-
TestUtils.ExecAndPrintLog("kubectl get domain -n " + DOM_NS);
78-
// domain.verifyDomainCreated();
7974
domain.verifyPodsCreated();
8075
domain.verifyServicesCreated();
8176
domain.verifyServersReady();
82-
// testBasicUseCases(domain);
83-
// testClusterScaling(operator20, domain);
84-
printCompVersions();
8577
logger.log(Level.INFO, "+++++++++++++++Ending Test Setup+++++++++++++++++++++");
8678
}
8779

@@ -91,8 +83,8 @@ public void cleanupOperatorAndDomain() throws Exception {
9183
if (domain != null) {
9284
domain.destroy();
9385
}
94-
if (operator20 != null) {
95-
operator20.destroy();
86+
if (operator != null) {
87+
operator.destroy();
9688
}
9789
ExecResult result = cleanup();
9890
TestUtils.ExecAndPrintLog(
@@ -195,13 +187,13 @@ public void testOperatorUpgradeFrom2_2_1() throws Exception {
195187
}
196188

197189
private void upgradeOperator(boolean restart) throws Exception {
198-
operator20.callHelmUpgrade("image=" + OP_TARGET_RELEASE);
190+
operator.callHelmUpgrade("image=" + OP_TARGET_RELEASE);
199191
if (restart) {
200192
checkDomainRollingRestarted();
201193
}
202194
checkOperatorVersion(DOM_TARGET_RELEASE_VERSION);
203195
testBasicUseCases(domain);
204-
testClusterScaling(operator20, domain);
196+
testClusterScaling(operator, domain);
205197
}
206198

207199
private void checkOperatorVersion(String version) throws Exception {

0 commit comments

Comments
 (0)