Skip to content

Commit 754ecc4

Browse files
authored
Merge pull request #1023 from oracle/fix-int-test-external-jenkins
use IP in sans if hostname contains IP address, fix domain in image tests
2 parents 628f2e5 + 4c1ed74 commit 754ecc4

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,9 +1354,15 @@ private void initialize(Map<String, Object> inputDomainMap) throws Exception {
13541354
}
13551355

13561356
if (domainMap.containsKey("domainHomeImageBuildPath")) {
1357-
domainHomeImageBuildPath = ((String) domainMap.get("domainHomeImageBuildPath")).trim();
1357+
domainHomeImageBuildPath =
1358+
BaseTest.getResultDir()
1359+
+ "/"
1360+
+ ((String) domainMap.get("domainHomeImageBuildPath")).trim();
13581361
domainMap.put(
1359-
"domainHomeImageBuildPath", BaseTest.getResultDir() + "/" + domainHomeImageBuildPath);
1362+
"domainHomeImageBuildPath",
1363+
BaseTest.getResultDir()
1364+
+ "/"
1365+
+ ((String) domainMap.get("domainHomeImageBuildPath")).trim());
13601366
}
13611367
if (System.getenv("IMAGE_PULL_SECRET_WEBLOGIC") != null) {
13621368
domainMap.put("imagePullSecretName", System.getenv("IMAGE_PULL_SECRET_WEBLOGIC"));

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,13 @@ private void generateInputYaml() throws Exception {
378378
sb.append(operatorNS);
379379
break;
380380
}
381-
sb.append(" DNS:");
381+
// here we are assuming that if the "host name" starts with a digit, then it is actually
382+
// an IP address, and so we need to use the "IP" prefix in the SANS.
383+
if (Character.isDigit(TestUtils.getHostName().charAt(0))) {
384+
sb.append(" IP:");
385+
} else {
386+
sb.append(" DNS:");
387+
}
382388
sb.append(TestUtils.getHostName());
383389
sb.append(" >> ");
384390
sb.append(generatedInputYamlFile);

0 commit comments

Comments
 (0)