@@ -52,7 +52,7 @@ public class ItPodsRestart extends BaseTest {
52
52
@ BeforeClass
53
53
public static void staticPrepare () throws Exception {
54
54
// initialize test properties and create the directories
55
- if (! QUICKTEST ) {
55
+ if (QUICKTEST ) {
56
56
initialize (APP_PROPS_FILE );
57
57
58
58
logger .info ("Checking if operator1 and domain are running, if not creating" );
@@ -79,7 +79,7 @@ public static void staticPrepare() throws Exception {
79
79
*/
80
80
@ AfterClass
81
81
public static void staticUnPrepare () throws Exception {
82
- if (! QUICKTEST ) {
82
+ if (QUICKTEST ) {
83
83
logger .info ("+++++++++++++++++++++++++++++++++---------------------------------+" );
84
84
logger .info ("BEGIN" );
85
85
logger .info ("Run once, release cluster lease" );
@@ -207,15 +207,13 @@ public void testServerPodsRestartByChangingIncludeServerOutInPodLog() throws Exc
207
207
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
208
208
* Verify that all the server pods in the domain got re-started .The property tested is: image:
209
209
* "container-registry.oracle.com/middleware/weblogic:12.2.1.3" --> image:
210
- * "container-registry.oracle.com/middleware/weblogic:duplicate" for internal env
211
- * "container-registry.oracle.com/middleware/weblogic:12.2.1.3-dev" for external shared cluster
212
- * env
210
+ * "container-registry.oracle.com/middleware/weblogic:duplicate"
213
211
*
214
212
* @throws Exception exception
215
213
*/
216
214
@ Test
217
215
public void testServerPodsRestartByChangingZImage () throws Exception {
218
- Assume .assumeFalse (QUICKTEST );
216
+ Assume .assumeTrue (QUICKTEST );
219
217
String testMethodName = new Object () {}.getClass ().getEnclosingMethod ().getName ();
220
218
logTestBegin (testMethodName );
221
219
@@ -230,10 +228,35 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
230
228
+ getWeblogicImageTag ()
231
229
+ " to "
232
230
+ "/weblogick8s/middleware/weblogic:duplicate" );
233
-
234
- if (BaseTest .SHARED_CLUSTER ) {
231
+
232
+ String newImage = getWeblogicImageServer ()+ "/middleware/weblogic:12.2.1.3-dev" ;
233
+ // apply new domain yaml and verify pod restart
234
+ domain .verifyDomainServerPodRestart (
235
+ "\" " + getWeblogicImageName () + ":" + getWeblogicImageTag () + "\" " ,
236
+ "\" " + newImage + "\" " );
237
+
238
+ /*if (BaseTest.SHARED_CLUSTER) {
235
239
String newImage =
236
- getWeblogicImageServer ()+ "/middleware/weblogic:12.2.1.3-dev" ;
240
+ System.getenv("REPO_REGISTRY") + "/weblogick8s/middleware/weblogic:duplicate";
241
+ // tag image with repo name
242
+ String tag =
243
+ "docker tag " + getWeblogicImageName() + ":" + getWeblogicImageTag() + " " + newImage;
244
+ TestUtils.exec(tag, true);
245
+ TestUtils.exec("docker images", true);
246
+
247
+ // login and push image to ocir
248
+ TestUtils.loginAndPushImageToOcir(newImage);
249
+
250
+ // create ocir registry secret in the same ns as domain which is used while pulling the
251
+ // image
252
+ TestUtils.createDockerRegistrySecret(
253
+ "docker-store",
254
+ System.getenv("REPO_REGISTRY"),
255
+ System.getenv("REPO_USERNAME"),
256
+ System.getenv("REPO_PASSWORD"),
257
+ System.getenv("REPO_EMAIL"),
258
+ domain.getDomainNs());
259
+
237
260
// apply new domain yaml and verify pod restart
238
261
domain.verifyDomainServerPodRestart(
239
262
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
@@ -251,7 +274,7 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
251
274
domain.verifyDomainServerPodRestart(
252
275
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
253
276
"\"" + getWeblogicImageName() + ":duplicate" + "\"");
254
- }
277
+ }*/
255
278
} finally {
256
279
if (!BaseTest .SHARED_CLUSTER ) {
257
280
TestUtils .exec ("docker rmi -f " + getWeblogicImageName () + ":duplicate" );
0 commit comments