2024-07-17 08:16:43 +00:00
|
|
|
#!/bin/bash -x
|
2023-02-09 09:14:20 +00:00
|
|
|
|
2024-06-03 12:17:28 +00:00
|
|
|
dnf install -y java-21-openjdk-devel
|
2023-02-09 09:14:20 +00:00
|
|
|
fips-mode-setup --enable --no-bootcfg
|
|
|
|
fips-mode-setup --is-enabled
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
STRICT_OPTIONS=""
|
|
|
|
if [ "$1" = "strict" ]; then
|
|
|
|
STRICT_OPTIONS="-Dauth.server.fips.mode=strict -Dauth.server.supported.keystore.types=BCFKS -Dauth.server.keystore.type=bcfks -Dauth.server.supported.rsa.key.sizes=2048,4096"
|
|
|
|
fi
|
|
|
|
echo "STRICT_OPTIONS: $STRICT_OPTIONS"
|
|
|
|
TESTS=`testsuite/integration-arquillian/tests/base/testsuites/suite.sh fips`
|
|
|
|
echo "Tests: $TESTS"
|
2024-06-03 12:17:28 +00:00
|
|
|
export JAVA_HOME=/etc/alternatives/java_sdk_21
|
2023-02-14 14:14:25 +00:00
|
|
|
set -o pipefail
|
2023-04-19 15:38:35 +00:00
|
|
|
|
2024-10-14 10:48:07 +00:00
|
|
|
# Build adapter distributions
|
|
|
|
./mvnw install -DskipTests -f distribution/pom.xml
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Build app servers
|
|
|
|
./mvnw install -DskipTests -Pbuild-app-servers -f testsuite/integration-arquillian/servers/app-server/pom.xml
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Prepare Quarkus distribution with BCFIPS
|
|
|
|
./mvnw install -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus,auth-server-fips140-2
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-04-19 15:38:35 +00:00
|
|
|
# Profile app-server-wildfly needs to be explicitly set for FIPS tests
|
2024-08-28 05:28:18 +00:00
|
|
|
./mvnw test -Dsurefire.rerunFailingTestsCount=$SUREFIRE_RERUN_FAILING_COUNT -nsu -B -Pauth-server-quarkus,auth-server-fips140-2,app-server-wildfly -Dcom.redhat.fips=false $STRICT_OPTIONS -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh
|