@@ -35,11 +35,11 @@ public class ITOperatorUpgrade extends BaseTest {
35
35
private static final String OP_BASE_REL = "2.0" ;
36
36
private static final String OP_TARGET_RELEASE = "weblogic-kubernetes-operator:latest" ;
37
37
private static final String DOM_TARGET_RELEASE_VERSION = "weblogic.oracle/v4" ;
38
- private static final String OP_NS = "weblogic-operator" ;
39
- private static final String OP_DEP_NAME = "operator-upgrade" ;
40
- private static final String OP_SA = "operator-sa" ;
41
- private static final String DOM_NS = "weblogic-domain" ;
42
- private static final String DUID = "operator20domain" ;
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" ;
43
43
private static String opUpgradeTmpDir ;
44
44
private Domain domain = null ;
45
45
private static Operator operator20 ;
@@ -88,17 +88,14 @@ private void setupOperatorAndDomain(String operatorGitRelease, String operatorRe
88
88
@ After
89
89
public void cleanupOperatorAndDomain () throws Exception {
90
90
logger .log (Level .INFO , "+++++++++++++++Beginning AfterTest cleanup+++++++++++++++++++++" );
91
- TestUtils .ExecAndPrintLog ("docker images" );
92
91
if (domain != null ) {
93
92
domain .destroy ();
94
93
}
95
94
if (operator20 != null ) {
96
95
operator20 .destroy ();
97
96
}
98
97
ExecResult result = cleanup ();
99
- logger .log (Level .INFO , "cleanup stdout\n " + result .stdout ());
100
- logger .log (Level .INFO , "cleanup stderr\n " + result .stderr ());
101
- TestUtils .ExecAndPrintLog ("helm del --purge operator-upgrade" );
98
+ TestUtils .ExecAndPrintLog ("helm del --purge " + OP_DEP_NAME );
102
99
TestUtils .ExecAndPrintLog (
103
100
"kubectl delete pods,services,deployments,replicasets,configmaps,services --all --grace-period=0 --force --ignore-not-found -n "
104
101
+ OP_NS );
@@ -107,8 +104,8 @@ public void cleanupOperatorAndDomain() throws Exception {
107
104
+ DOM_NS );
108
105
TestUtils .ExecAndPrintLog (
109
106
"kubectl delete crd --all --grace-period=0 --ignore-not-found --force" );
110
- TestUtils .ExecAndPrintLog ("kubectl delete ns weblogic-operator --ignore-not-found --force" );
111
- TestUtils .ExecAndPrintLog ("kubectl delete ns weblogic-domain --ignore-not-found --force" );
107
+ TestUtils .ExecAndPrintLog ("kubectl delete ns " + OP_NS + " --ignore-not-found --force" );
108
+ TestUtils .ExecAndPrintLog ("kubectl delete ns " + DOM_NS + " --ignore-not-found --force" );
112
109
TestUtils .ExecAndPrintLog ("kubectl get all --all-namespaces" );
113
110
logger .log (Level .INFO , "+++++++++++++++Done AfterTest cleanup+++++++++++++++++++++" );
114
111
}
@@ -133,6 +130,11 @@ public static void staticUnPrepare() throws Exception {
133
130
public void test1OperatorUpgradeFrom2_0 () throws Exception {
134
131
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
135
132
logTestBegin (testMethod );
133
+ OP_NS = "weblogic-operator20" ;
134
+ OP_DEP_NAME = "operator-upgrade20" ;
135
+ OP_SA = "operator-sa20" ;
136
+ DOM_NS = "weblogic-domain20" ;
137
+ DUID = "operatordomain20" ;
136
138
setupOperatorAndDomain ("2.0" , "2.0" );
137
139
upgradeOperator (true );
138
140
logger .info ("SUCCESS - " + testMethod );
@@ -142,6 +144,11 @@ public void test1OperatorUpgradeFrom2_0() throws Exception {
142
144
public void test5OperatorUpgradeFrom2_0_1 () throws Exception {
143
145
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
144
146
logTestBegin (testMethod );
147
+ OP_NS = "weblogic-operator201" ;
148
+ OP_DEP_NAME = "operator-upgrade201" ;
149
+ OP_SA = "operator-sa201" ;
150
+ DOM_NS = "weblogic-domain201" ;
151
+ DUID = "operatordomain201" ;
145
152
setupOperatorAndDomain ("release/2.0.1" , "2.0.1" );
146
153
upgradeOperator (true );
147
154
logger .info ("SUCCESS - " + testMethod );
@@ -151,6 +158,11 @@ public void test5OperatorUpgradeFrom2_0_1() throws Exception {
151
158
public void test3OperatorUpgradeFrom2_1 () throws Exception {
152
159
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
153
160
logTestBegin (testMethod );
161
+ OP_NS = "weblogic-operator21" ;
162
+ OP_DEP_NAME = "operator-upgrade21" ;
163
+ OP_SA = "operator-sa21" ;
164
+ DOM_NS = "weblogic-domain21" ;
165
+ DUID = "operatordomain21" ;
154
166
setupOperatorAndDomain ("release/2.1" , "2.1" );
155
167
upgradeOperator (false );
156
168
logger .info ("SUCCESS - " + testMethod );
@@ -160,6 +172,11 @@ public void test3OperatorUpgradeFrom2_1() throws Exception {
160
172
public void test4OperatorUpgradeFrom2_2_0 () throws Exception {
161
173
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
162
174
logTestBegin (testMethod );
175
+ OP_NS = "weblogic-operator220" ;
176
+ OP_DEP_NAME = "operator-upgrade220" ;
177
+ OP_SA = "operator-sa220" ;
178
+ DOM_NS = "weblogic-domain220" ;
179
+ DUID = "operatordomain220" ;
163
180
setupOperatorAndDomain ("release/2.2" , "2.2.0" );
164
181
upgradeOperator (false );
165
182
logger .info ("SUCCESS - " + testMethod );
@@ -169,6 +186,11 @@ public void test4OperatorUpgradeFrom2_2_0() throws Exception {
169
186
public void test2OperatorUpgradeFrom2_2_1 () throws Exception {
170
187
String testMethod = new Object () {}.getClass ().getEnclosingMethod ().getName ();
171
188
logTestBegin (testMethod );
189
+ OP_NS = "weblogic-operator221" ;
190
+ OP_DEP_NAME = "operator-upgrade221" ;
191
+ OP_SA = "operator-sa221" ;
192
+ DOM_NS = "weblogic-domain221" ;
193
+ DUID = "operatordomain221" ;
172
194
setupOperatorAndDomain ("release/2.2.1" , "2.2.1" );
173
195
upgradeOperator (false );
174
196
logger .info ("SUCCESS - " + testMethod );
0 commit comments