Skip to content

Commit be4f239

Browse files
committed
fix
1 parent ae1aa9e commit be4f239

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import java.nio.file.Path;
1111
import java.nio.file.Paths;
1212
import java.util.Map;
13+
import java.util.logging.Level;
1314
import oracle.kubernetes.operator.utils.Domain;
1415
import oracle.kubernetes.operator.utils.DomainCRD;
1516
import oracle.kubernetes.operator.utils.ExecResult;
@@ -326,27 +327,32 @@ public void testAdminServerRestartVersions() throws Exception {
326327
try {
327328
logger.info("Modifying the Domain CRD..");
328329
DomainCRD crd = new DomainCRD();
329-
String yaml =
330-
crd.addRestartVersionToAdminServer(
331-
TestUtils.exec(
332-
"kubectl get Domain "
333-
+ domain.getDomainUid()
334-
+ " -n "
335-
+ domain.getDomainNS()
336-
+ " --output json")
337-
.stdout(),
338-
"v1.1");
330+
logger.log(
331+
Level.INFO,
332+
"Running kubectl get Domain {0} -n {1} --output json",
333+
new Object[] {domain.getDomainUid(), domain.getDomainNS()});
334+
String jsonCrd =
335+
TestUtils.exec(
336+
"kubectl get Domain "
337+
+ domain.getDomainUid()
338+
+ " -n "
339+
+ domain.getDomainNS()
340+
+ " --output json")
341+
.stdout();
342+
logger.info(jsonCrd);
343+
String yaml = crd.addRestartVersionToAdminServer(jsonCrd, "v1.1");
344+
logger.info(yaml);
339345
Path path = Paths.get(restartTmpDir, "restart.admin.yaml");
340-
logger.info("Path of the modified domain.yaml :" + path.toString());
346+
logger.log(Level.INFO, "Path of the modified domain.yaml :{0}", path.toString());
341347
Charset charset = StandardCharsets.UTF_8;
342348
Files.write(path, yaml.getBytes(charset));
343-
logger.info("Running kubectl apply -f " + path.toString());
349+
logger.log(Level.INFO, "Running kubectl apply -f {0}", path.toString());
344350
ExecResult exec = TestUtils.exec("kubectl apply -f " + path.toString());
345351
logger.info(exec.stdout());
346352
logger.info("Verifying if the admin server is restarted");
347353
domain.verifyAdminServerRestarted();
348354
} finally {
349-
logger.info("Running kubectl apply -f " + originalYaml);
355+
logger.log(Level.INFO, "Running kubectl apply -f {0}", originalYaml);
350356
TestUtils.exec("kubectl apply -f " + originalYaml);
351357
logger.info("Verifying if the admin server is restarted");
352358
domain.verifyAdminServerRestarted();

0 commit comments

Comments
 (0)