Skip to content

Commit f7cdc28

Browse files
authored
Merge pull request #20900 from kristip17/avoidRWacmeCATestsISeries
Skip custom RW FATs on iSeries for acmeCA
2 parents de666ce + 9cc5931 commit f7cdc28

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

dev/com.ibm.ws.security.acme_fat/fat/src/com/ibm/ws/security/acme/fat/AcmeConfigVariationsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2021 IBM Corporation and others.
2+
* Copyright (c) 2020, 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -386,7 +386,7 @@ public void updateconfig_bad_to_good() throws Exception {
386386
AcmeFatUtils.configureAcmeCA(server, caContainer, configuration);
387387
assertNotNull("Expected CWPKI2042E in logs.", server.waitForStringInLog("CWPKI2042E"));
388388

389-
if (AcmeFatUtils.isWindows(testName.getMethodName())) {
389+
if (AcmeFatUtils.isWindows(testName.getMethodName()) || AcmeFatUtils.isISeries(testName.getMethodName())) {
390390
acmeCA.setSubjectDN("cn=domain1.com");
391391
acmeCA.setAccountKeyFile(null);
392392
} else {

dev/com.ibm.ws.security.acme_fat/fat/src/com/ibm/ws/security/acme/fat/AcmeSwapDirectoriesTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2020, 2021 IBM Corporation and others.
2+
* Copyright (c) 2020, 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -248,9 +248,10 @@ public void update_directoryURI() throws Exception {
248248
@CheckForLeakedPasswords(AcmeFatUtils.CACERTS_TRUSTSTORE_PASSWORD)
249249
public void update_directoryURI_filePermissions() throws Exception {
250250
Assume.assumeTrue(!AcmeFatUtils.isWindows(testName.getMethodName()));
251-
/*
252-
* Configure the acmeCA-2.0 feature.
253-
*/
251+
Assume.assumeTrue(!AcmeFatUtils.isISeries(testName.getMethodName()));
252+
/*
253+
* Configure the acmeCA-2.0 feature.
254+
*/
254255
AcmeFatUtils.configureAcmeCA(server, caContainer, ORIGINAL_CONFIG, false, false, false, DOMAINS_1);
255256

256257
try {
@@ -318,7 +319,7 @@ public void update_directoryURI_filePermissions() throws Exception {
318319
AcmeFatUtils.waitForAcmeToCreateCertificate(server);
319320

320321
if (acmefile.exists()) {
321-
fail("The ACME file should not exist.");
322+
fail("The ACME file should not exist. Running test on OS: " + System.getProperty("os.name"));
322323
}
323324
Log.info(this.getClass(), testName.getMethodName(), "TEST 2: FINISH.");
324325

dev/com.ibm.ws.security.acme_fat/fat/src/com/ibm/ws/security/acme/utils/AcmeFatUtils.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,22 @@ public static boolean isWindows(String methodName) {
880880
}
881881
return false;
882882
}
883+
884+
/**
885+
* Check if the test is running on iSeries / OS/400
886+
* @param methodName the name of the method being run.
887+
* @return True if the test is running on iSeries.
888+
*/
889+
public static boolean isISeries(String methodName) {
890+
if (System.getProperty("os.name").toLowerCase().startsWith("os/400")) {
891+
// iSeries not enforcing the setReadable/setWriteable
892+
Log.info(AcmeFatUtils.class, methodName,
893+
"Skipping unreadable/unwriteable file tests on iSeries: "
894+
+ System.getProperty("os.name", "unknown"));
895+
return true;
896+
}
897+
return false;
898+
}
883899

884900
/**
885901
* Handle adding CWPKI2045W as an allowed warning message to all stopServer requests.

0 commit comments

Comments
 (0)