Skip to content

Commit a942a7e

Browse files
committed
Allow integration test scripts to take FIPS flag
1 parent 28fae95 commit a942a7e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.buildkite/scripts/buildkite-integration-tests.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
GROUP_NAME=$1
55
TEST_SUDO=$2
6+
TEST_FIPS=$3
67

78
if [ -z "$GROUP_NAME" ]; then
89
echo "Error: Specify the group name: sudo-integration-tests.sh [group_name]" >&2
@@ -14,6 +15,11 @@ if [ -z "$TEST_SUDO" ]; then
1415
exit 1
1516
fi
1617

18+
if [ -z "$TEST_FIPS" ]; then
19+
echo "Error: Specify the test FIPS: sudo-integration-tests.sh [group_name] [test_sudo] [test_fips]" >&2
20+
exit 1
21+
fi
22+
1723
if [ "$TEST_SUDO" == "true" ]; then
1824
echo "Re-initializing ASDF. The user is changed to root..."
1925
export ASDF_DATA_DIR="/opt/buildkite-agent/.asdf"
@@ -51,7 +57,19 @@ outputJSON="build/${fully_qualified_group_name}.integration.out.json"
5157
echo "~~~ Integration tests: ${GROUP_NAME}"
5258

5359
set +e
54-
TEST_BINARY_NAME="elastic-agent" AGENT_VERSION="${AGENT_VERSION}" SNAPSHOT=true gotestsum --no-color -f standard-quiet --junitfile "${outputXML}" --jsonfile "${outputJSON}" -- -tags integration -test.shuffle on -test.timeout 2h0m0s github.com/elastic/elastic-agent/testing/integration -v -args -integration.groups="${GROUP_NAME}" -integration.sudo="${TEST_SUDO}"
60+
TEST_BINARY_NAME="elastic-agent" AGENT_VERSION="${AGENT_VERSION}" SNAPSHOT=true \
61+
gotestsum --no-color -f standard-quiet \
62+
--junitfile "${outputXML}" \
63+
--jsonfile "${outputJSON}" \
64+
-- \
65+
-tags integration -test.shuffle on -test.timeout 2h0m0s \
66+
github.com/elastic/elastic-agent/testing/integration \
67+
-v \
68+
-args \
69+
-integration.groups="${GROUP_NAME}" \
70+
-integration.sudo="${TEST_SUDO}" \
71+
-integration.fips="${TEST_FIPS}"
72+
5573
TESTS_EXIT_STATUS=$?
5674
set -e
5775

.buildkite/scripts/steps/integration_tests_tf.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ asdf install
1111

1212
GROUP_NAME=$1
1313
TEST_SUDO=$2
14+
TEST_FIPS=$3
1415
if [ -z "$GROUP_NAME" ]; then
1516
echo "Error: Specify the group name: integration_tests_tf.sh [group_name]" >&2
1617
exit 1
@@ -21,6 +22,11 @@ if [ -z "$TEST_SUDO" ]; then
2122
exit 1
2223
fi
2324

25+
if [ -z "$TEST_FIPS" ]; then
26+
echo "Error: Specify the test FIPS: sudo-integration-tests.sh [group_name] [test_sudo] [test_fips]" >&2
27+
exit 1
28+
fi
29+
2430
# Override the agent package version using a string with format <major>.<minor>.<patch>
2531
# There is a time when the snapshot is not built yet, so we cannot use the latest version automatically
2632
# This file is managed by an automation (mage integration:UpdateAgentPackageVersion) that check if the snapshot is ready.

0 commit comments

Comments
 (0)