Skip to content

Commit ddca530

Browse files
committed
debug
1 parent 0ace4af commit ddca530

File tree

3 files changed

+41
-8
lines changed

3 files changed

+41
-8
lines changed

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

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import java.util.logging.Level;
1515
import oracle.kubernetes.operator.utils.Domain;
1616
import oracle.kubernetes.operator.utils.DomainCRD;
17+
import oracle.kubernetes.operator.utils.ExecCommand;
1718
import oracle.kubernetes.operator.utils.ExecResult;
1819
import oracle.kubernetes.operator.utils.K8sTestUtils;
1920
import oracle.kubernetes.operator.utils.Operator;
@@ -218,13 +219,37 @@ public void testServerPodsRestartByChangingZImage() throws Exception {
218219

219220
// create ocir registry secret in the same ns as domain which is used while pulling the
220221
// image
221-
TestUtils.createDockerRegistrySecret(
222-
"docker-store",
223-
BaseTest.getWeblogicImageServer(),
224-
System.getenv("OCR_USERNAME"),
225-
System.getenv("OCR_PASSWORD"),
226-
227-
domain.getDomainNS());
222+
// TestUtils.createDockerRegistrySecret(
223+
// "docker-store",
224+
// BaseTest.getWeblogicImageServer(),
225+
// System.getenv("OCR_USERNAME"),
226+
// System.getenv("OCR_PASSWORD"),
227+
228+
// domain.getDomainNS());
229+
230+
String command =
231+
"kubectl create secret docker-registry docker-store "
232+
+ "--docker-server="
233+
+ BaseTest.getWeblogicImageServer()
234+
+ " --docker-username="
235+
+ System.getenv("OCR_USERNAME")
236+
+ " --docker-password="
237+
+ System.getenv("OCR_PASSWORD")
238+
+ " -n "
239+
+ domain.getDomainNS()
240+
+ " --dry-run -o yaml | kubectl apply -f - ";
241+
242+
logger.info("Executing " + command);
243+
ExecResult result = ExecCommand.exec(command);
244+
logger.info(
245+
"Command "
246+
+ command
247+
+ " return value "
248+
+ result.exitValue()
249+
+ " \n failed with stderr = "
250+
+ result.stderr()
251+
+ " \n stdout = "
252+
+ result.stdout());
228253

229254
// apply new domain yaml and verify pod restart
230255
domain.verifyDomainServerPodRestart(

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,14 @@ public void verifyDomainServerPodRestart(String oldPropertyString, String newPro
969969
+ "/weblogic-domains/"
970970
+ domainUid
971971
+ "/domain_new.yaml");
972+
logger.info(
973+
TestUtils.exec(
974+
"cat "
975+
+ BaseTest.getUserProjectsDir()
976+
+ "/weblogic-domains/"
977+
+ domainUid
978+
+ "/domain_new.yaml")
979+
.stdout());
972980
logger.info("kubectl execut with command: " + command.toString());
973981
TestUtils.exec(command.toString());
974982

integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ public static ExecResult exec(String cmd) throws Exception {
240240
+ cmd
241241
+ " return value "
242242
+ result.exitValue()
243-
+ " failed with stderr = "
243+
+ " \n failed with stderr = "
244244
+ result.stderr()
245245
+ " \n stdout = "
246246
+ result.stdout());

0 commit comments

Comments
 (0)