
* Rework Ginkgo usage Currently Ginkgo is launched multiple times with different options to accomodate various use-cases. In particular, some specs needs to be run sequentially because non-namespaced objects are created that conflicts with concurent Helm deployments. However Ginkgo is able to handle such cases natively, in particular specs that needs to be run sequentially are supported (Serial spec). This commit marks the specs that needs to be run sequentially as Serial specs and runs the whole test suite from a single Ginkgo invocation. As a result, a single JUnit report is now generated. Signed-off-by: Hervé Werner <dud225@hotmail.com> * Fix controller error in test Error getting ConfigMap "$NAMESPACE/tcp-services": no object matching key "$NAMESPACE/tcp-services" in local store Signed-off-by: Hervé Werner <dud225@hotmail.com> * Replace "go get" invocations by "go install" Executing "go get" changes the go.mod & go.sum files which is not the case of "go install". Signed-off-by: Hervé Werner <dud225@hotmail.com> * Always clean out the Helm deployment Signed-off-by: Hervé Werner <dud225@hotmail.com> * Add E2E test to verify that changes to one or more configmap trigger an update Signed-off-by: Hervé Werner <dud225@hotmail.com> --------- Signed-off-by: Hervé Werner <dud225@hotmail.com>
52 lines
1.4 KiB
Bash
Executable file
52 lines
1.4 KiB
Bash
Executable file
#!/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.
|
|
|
|
set -eu
|
|
|
|
NC='\e[0m'
|
|
BGREEN='\e[32m'
|
|
|
|
E2E_NODES=${E2E_NODES:-5}
|
|
E2E_CHECK_LEAKS=${E2E_CHECK_LEAKS:-""}
|
|
|
|
reportFile="report-e2e-test-suite.xml"
|
|
ginkgo_args=(
|
|
"--fail-fast"
|
|
"--flake-attempts=2"
|
|
"--junit-report=${reportFile}"
|
|
"--nodes=${E2E_NODES}"
|
|
"--poll-progress-after=180s"
|
|
"--randomize-all"
|
|
"--show-node-events"
|
|
"--succinct"
|
|
"--timeout=75m"
|
|
)
|
|
|
|
if [ -n "${FOCUS}" ]; then
|
|
ginkgo_args+=("--focus=${FOCUS}")
|
|
fi
|
|
|
|
if [ -z "${E2E_CHECK_LEAKS}" ]; then
|
|
ginkgo_args+=("--skip=\[Memory Leak\]")
|
|
fi
|
|
|
|
echo -e "${BGREEN}Running e2e test suite...${NC}"
|
|
(set -x; ginkgo "${ginkgo_args[@]}" /e2e.test)
|
|
|
|
# Create configMap out of a compressed report file for extraction later
|
|
gzip -k ${reportFile}
|
|
kubectl create cm ${reportFile}.gz --from-file ${reportFile}.gz
|
|
kubectl label cm ${reportFile}.gz junitreport=true
|