2019-02-22 14:03:42 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Copyright 2019 The Kubernetes Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2023-02-16 14:15:39 +00:00
|
|
|
set -eu
|
2019-02-22 14:03:42 +00:00
|
|
|
|
2019-06-27 14:03:20 +00:00
|
|
|
NC='\e[0m'
|
|
|
|
BGREEN='\e[32m'
|
|
|
|
|
2019-02-22 14:03:42 +00:00
|
|
|
E2E_NODES=${E2E_NODES:-5}
|
2019-06-27 14:03:20 +00:00
|
|
|
E2E_CHECK_LEAKS=${E2E_CHECK_LEAKS:-""}
|
2019-02-22 14:03:42 +00:00
|
|
|
|
2023-02-16 14:15:39 +00:00
|
|
|
reportFile="report-e2e-test-suite.xml"
|
2019-02-22 14:03:42 +00:00
|
|
|
ginkgo_args=(
|
2023-02-16 14:15:39 +00:00
|
|
|
"--fail-fast"
|
|
|
|
"--flake-attempts=2"
|
|
|
|
"--junit-report=${reportFile}"
|
|
|
|
"--nodes=${E2E_NODES}"
|
2022-12-04 19:50:01 +00:00
|
|
|
"--poll-progress-after=180s"
|
2023-02-16 14:15:39 +00:00
|
|
|
"--randomize-all"
|
|
|
|
"--show-node-events"
|
|
|
|
"--succinct"
|
|
|
|
"--timeout=75m"
|
2019-02-22 14:03:42 +00:00
|
|
|
)
|
|
|
|
|
2023-02-16 14:15:39 +00:00
|
|
|
if [ -n "${FOCUS}" ]; then
|
|
|
|
ginkgo_args+=("--focus=${FOCUS}")
|
|
|
|
fi
|
2019-02-22 14:03:42 +00:00
|
|
|
|
2023-02-16 14:15:39 +00:00
|
|
|
if [ -z "${E2E_CHECK_LEAKS}" ]; then
|
|
|
|
ginkgo_args+=("--skip=\[Memory Leak\]")
|
|
|
|
fi
|
2023-01-16 02:46:50 +00:00
|
|
|
|
2023-02-16 14:15:39 +00:00
|
|
|
echo -e "${BGREEN}Running e2e test suite...${NC}"
|
|
|
|
(set -x; ginkgo "${ginkgo_args[@]}" /e2e.test)
|
2019-06-27 14:03:20 +00:00
|
|
|
|
2022-12-03 01:43:53 +00:00
|
|
|
# Create configMap out of a compressed report file for extraction later
|
2023-02-16 14:15:39 +00:00
|
|
|
gzip -k ${reportFile}
|
|
|
|
kubectl create cm ${reportFile}.gz --from-file ${reportFile}.gz
|
|
|
|
kubectl label cm ${reportFile}.gz junitreport=true
|