Skip to content

Commit 7a6149b

Browse files
authored
Run x-pack tests under FIPS mode (#17254)
This commit adds two new CI cells to cover x-pack tests running in FIPS mode. This ensures we have coverage of these features when running existing x-pack tests.
1 parent 8f7873f commit 7a6149b

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.buildkite/pull_request_pipeline.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,40 @@ steps:
267267
source .buildkite/scripts/common/container-agent.sh
268268
x-pack/ci/integration_tests.sh
269269
270+
- label: ":lab_coat: x-pack unit tests - FIPS mode"
271+
key: "x-pack-unit-tests-fips"
272+
agents:
273+
provider: gcp
274+
imageProject: elastic-images-prod
275+
image: family/platform-ingest-logstash-ubuntu-2204
276+
machineType: "n2-standard-4"
277+
diskSizeGb: 64
278+
retry:
279+
automatic:
280+
- limit: 3
281+
command: |
282+
set -euo pipefail
283+
284+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
285+
docker run -e FIPS_MODE=true test-runner-image x-pack/ci/unit_tests.sh
286+
287+
- label: ":lab_coat: x-pack integration - FIPS mode"
288+
key: "integration-tests-x-pack-fips"
289+
agents:
290+
provider: gcp
291+
imageProject: elastic-images-prod
292+
image: family/platform-ingest-logstash-ubuntu-2204
293+
machineType: "n2-standard-4"
294+
diskSizeGb: 64
295+
retry:
296+
automatic:
297+
- limit: 3
298+
command: |
299+
set -euo pipefail
300+
301+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
302+
docker run -e FIPS_MODE=true test-runner-image x-pack/ci/integration_tests.sh
303+
270304
- wait: ~
271305
continue_on_failure: true
272306

x-pack/ci/integration_tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ if [ -n "$BUILD_JAVA_HOME" ]; then
1717
export LS_JAVA_HOME="$BUILD_JAVA_HOME"
1818
fi
1919

20-
./gradlew runXPackIntegrationTests
20+
if [ -n "$FIPS_MODE" ]; then
21+
./gradlew runXPackIntegrationTests -PrunTestsInFIPSMode=true
22+
else
23+
./gradlew runXPackIntegrationTests
24+
fi

x-pack/ci/unit_tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ if [ -n "$BUILD_JAVA_HOME" ]; then
1616
GRADLE_OPTS="$GRADLE_OPTS -Dorg.gradle.java.home=$BUILD_JAVA_HOME"
1717
fi
1818

19-
./gradlew runXPackUnitTests
19+
if [ -n "$FIPS_MODE" ]; then
20+
./gradlew runXPackUnitTests -PrunTestsInFIPSMode=true
21+
else
22+
./gradlew runXPackUnitTests
23+
fi

0 commit comments

Comments
 (0)