Skip to content

Commit 079965f

Browse files
committed
Run x-pack tests under FIPS mode (elastic#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 481b2a1 commit 079965f

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
@@ -304,6 +304,40 @@ steps:
304304
source .buildkite/scripts/common/container-agent.sh
305305
x-pack/ci/integration_tests.sh
306306
307+
- label: ":lab_coat: x-pack unit tests - FIPS mode"
308+
key: "x-pack-unit-tests-fips"
309+
agents:
310+
provider: gcp
311+
imageProject: elastic-images-prod
312+
image: family/platform-ingest-logstash-ubuntu-2204
313+
machineType: "n2-standard-4"
314+
diskSizeGb: 64
315+
retry:
316+
automatic:
317+
- limit: 3
318+
command: |
319+
set -euo pipefail
320+
321+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
322+
docker run -e FIPS_MODE=true test-runner-image x-pack/ci/unit_tests.sh
323+
324+
- label: ":lab_coat: x-pack integration - FIPS mode"
325+
key: "integration-tests-x-pack-fips"
326+
agents:
327+
provider: gcp
328+
imageProject: elastic-images-prod
329+
image: family/platform-ingest-logstash-ubuntu-2204
330+
machineType: "n2-standard-4"
331+
diskSizeGb: 64
332+
retry:
333+
automatic:
334+
- limit: 3
335+
command: |
336+
set -euo pipefail
337+
338+
docker build -t test-runner-image -f x-pack/distributions/internal/observabilitySRE/docker/Dockerfile .
339+
docker run -e FIPS_MODE=true test-runner-image x-pack/ci/integration_tests.sh
340+
307341
- wait: ~
308342
continue_on_failure: true
309343

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)