-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[e2e-tests] feat: add k8s integration tests (#5013)
* feat: wip k8s integration tests * feat: remove kubernetes platform package * feat: remove Package target from kubernetes * feat: support provisioning multiple instances for kind * fix: reinstate go.mod changes from merge * fix: use supported kind k8s versions * feat: add agent standalone test * fix: reinstate go.mod changes from merge * fix: correct import order and check err with require * ci: update k8s 1.28 to latest kind supported version
- Loading branch information
1 parent
bb8b459
commit 79547df
Showing
21 changed files
with
4,479 additions
and
421 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
source .buildkite/scripts/common.sh | ||
|
||
export PATH=$HOME/bin:${PATH} | ||
source .buildkite/scripts/install-kubectl.sh | ||
source .buildkite/scripts/install-kind.sh | ||
|
||
# Increase max inotify instances and watches to avoid 'too many open files' errors | ||
# when spawning more than one k8s cluster | ||
sudo sysctl fs.inotify.max_user_instances=1280 | ||
sudo sysctl fs.inotify.max_user_watches=655360 | ||
|
||
# Run k8s integration tests | ||
set +e | ||
|
||
arch_type="$(uname -m)" | ||
if [ "${arch_type}" == "x86_64" ]; then | ||
export PLATFORMS="linux/amd64" | ||
elif [[ "${arch_type}" == "aarch64" || "${arch_type}" == "arm64" ]]; then | ||
export PLATFORMS="linux/arm64" | ||
else | ||
echo "Unsupported OS" | ||
exit 10 | ||
fi | ||
|
||
DEV=true SNAPSHOT=true EXTERNAL=true PACKAGES=docker mage -v package | ||
TEST_INTEG_CLEAN_ON_EXIT=true INSTANCE_PROVISIONER=kind STACK_PROVISIONER=stateful SNAPSHOT=true mage integration:kubernetes | ||
TESTS_EXIT_STATUS=$? | ||
set -e | ||
|
||
# HTML report | ||
outputXML="build/TEST-go-integration.xml" | ||
|
||
if [ -f "$outputXML" ]; then | ||
go install github.com/alexec/junit2html@latest | ||
junit2html < "$outputXML" > build/TEST-report.html | ||
else | ||
echo "Cannot generate HTML test report: $outputXML not found" | ||
fi | ||
|
||
exit $TESTS_EXIT_STATUS |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.