-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathrun-e2e-kind.sh
More file actions
executable file
·77 lines (67 loc) · 2.2 KB
/
Copy pathrun-e2e-kind.sh
File metadata and controls
executable file
·77 lines (67 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/bash
# Copyright 2025 NVIDIA CORPORATION
# SPDX-License-Identifier: Apache-2.0
CLUSTER_NAME=${CLUSTER_NAME:-e2e-kai-scheduler}
REPO_ROOT=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/..
GOPATH=${HOME}/go
GOBIN=${GOPATH}/bin
# Parse named parameters
TEST_THIRD_PARTY_INTEGRATIONS="false"
TEST_HAMI="false"
LOCAL_IMAGES_BUILD="false"
PRESERVE_CLUSTER="false"
while [[ $# -gt 0 ]]; do
case $1 in
--test-third-party-integrations)
TEST_THIRD_PARTY_INTEGRATIONS="true"
shift
;;
--test-hami)
TEST_HAMI="true"
shift
;;
--local-images-build)
LOCAL_IMAGES_BUILD="true"
shift
;;
--preserve-cluster)
PRESERVE_CLUSTER="true"
shift
;;
-h|--help)
echo "Usage: $0 [--test-third-party-integrations] [--test-hami] [--local-images-build] [--preserve-cluster]"
echo " --test-third-party-integrations: Install third party operators for compatibility testing"
echo " --test-hami: Enable HAMi/hamicore integration (binder hamicore plugin + kai-resource-isolator)"
echo " --local-images-build: Build and use local images instead of pulling from registry"
echo " --preserve-cluster: Keep the kind cluster after running the test suite"
exit 0
;;
*)
echo "Unknown option $1"
echo "Use --help for usage information"
exit 1
;;
esac
done
# Build setup script arguments
SETUP_ARGS=""
if [ "$TEST_THIRD_PARTY_INTEGRATIONS" = "true" ]; then
SETUP_ARGS="$SETUP_ARGS --test-third-party-integrations"
fi
if [ "$TEST_HAMI" = "true" ]; then
SETUP_ARGS="$SETUP_ARGS --test-hami"
fi
if [ "$LOCAL_IMAGES_BUILD" = "true" ]; then
SETUP_ARGS="$SETUP_ARGS --local-images-build"
fi
# Run the cluster setup script
${REPO_ROOT}/hack/setup-e2e-cluster.sh $SETUP_ARGS
# Install ginkgo if it's not installed
if [ ! -f ${GOBIN}/ginkgo ]; then
echo "Installing ginkgo"
GOBIN=${GOBIN} go install github.com/onsi/ginkgo/v2/ginkgo@v2.25.3
fi
${GOBIN}/ginkgo -r --keep-going --randomize-all --randomize-suites --label-filter '!autoscale && !scale && !upgrade && !gitops' --trace -vv ${REPO_ROOT}/test/e2e/suites
if [ "$PRESERVE_CLUSTER" != "true" ]; then
kind delete cluster --name $CLUSTER_NAME
fi