Skip to content

Commit e565383

Browse files
committed
debugging
1 parent efce8d7 commit e565383

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

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

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class ItPodsRestart extends BaseTest {
5252
@BeforeClass
5353
public static void staticPrepare() throws Exception {
5454
// initialize test properties and create the directories
55-
if (!QUICKTEST) {
55+
if (QUICKTEST) {
5656
initialize(APP_PROPS_FILE);
5757

5858
logger.info("Checking if operator1 and domain are running, if not creating");
@@ -79,7 +79,7 @@ public static void staticPrepare() throws Exception {
7979
*/
8080
@AfterClass
8181
public static void staticUnPrepare() throws Exception {
82-
if (!QUICKTEST) {
82+
if (QUICKTEST) {
8383
logger.info("+++++++++++++++++++++++++++++++++---------------------------------+");
8484
logger.info("BEGIN");
8585
logger.info("Run once, release cluster lease");
@@ -207,15 +207,13 @@ public void testServerPodsRestartByChangingIncludeServerOutInPodLog() throws Exc
207207
* Modify the domain scope property on the domain resource using kubectl apply -f domain.yaml
208208
* Verify that all the server pods in the domain got re-started .The property tested is: image:
209209
* "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"
213211
*
214212
* @throws Exception exception
215213
*/
216214
@Test
217215
public void testServerPodsRestartByChangingZImage() throws Exception {
218-
Assume.assumeFalse(QUICKTEST);
216+
Assume.assumeTrue(QUICKTEST);
219217
String testMethodName = new Object() {}.getClass().getEnclosingMethod().getName();
220218
logTestBegin(testMethodName);
221219

@@ -230,10 +228,35 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
230228
+ getWeblogicImageTag()
231229
+ " to "
232230
+ "/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) {
235239
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+
237260
// apply new domain yaml and verify pod restart
238261
domain.verifyDomainServerPodRestart(
239262
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
@@ -251,7 +274,7 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
251274
domain.verifyDomainServerPodRestart(
252275
"\"" + getWeblogicImageName() + ":" + getWeblogicImageTag() + "\"",
253276
"\"" + getWeblogicImageName() + ":duplicate" + "\"");
254-
}
277+
}*/
255278
} finally {
256279
if (!BaseTest.SHARED_CLUSTER) {
257280
TestUtils.exec("docker rmi -f " + getWeblogicImageName() + ":duplicate");

0 commit comments

Comments
 (0)