Expand nightly E2E tests (#6354)

Signed-off-by: Shylaja Devadiga <shylaja@rancher.com>
This commit is contained in:
ShylajaDevadiga 2022-10-31 11:02:44 -07:00 committed by GitHub
parent ce5dfdfae0
commit d3c675f4e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 9 deletions

View File

@ -29,7 +29,7 @@ var local = flag.Bool("local", false, "deploy a locally built K3s binary")
func Test_E2EClusterReset(t *testing.T) {
RegisterFailHandler(Fail)
flag.Parse()
RunSpecs(t, "Create ClusterReset Test Suite")
RunSpecs(t, "ClusterReset Test Suite")
}
var (

View File

@ -23,7 +23,7 @@ var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
func Test_E2EClusterValidation(t *testing.T) {
RegisterFailHandler(Fail)
flag.Parse()
RunSpecs(t, "Create Cluster Test Suite")
RunSpecs(t, "Docker CRI Test Suite")
}
var (

View File

@ -21,7 +21,7 @@ var hardened = flag.Bool("hardened", false, "true or false")
func Test_E2EDualStack(t *testing.T) {
flag.Parse()
RegisterFailHandler(Fail)
RunSpecs(t, "Validate DualStack Suite")
RunSpecs(t, "DualStack Suite")
}
var (

View File

@ -13,19 +13,38 @@ eval openvpn --daemon --config external.ovpn &>/dev/null &
sleep 10
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s && git pull --rebase origin master'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s && go mod tidy'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s && /usr/local/go/bin/go mod tidy'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e/dualstack && vagrant global-status | awk '/running/'|cut -c1-7| xargs -r -d '\n' -n 1 -- vagrant destroy -f"
echo "RUNNING DUALSTACK VALIDATION TEST"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v dualstack/dualstack_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/dualstack && vagrant destroy -f'
echo 'RUNNING CLUSTER VALIDATION TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && E2E_REGISTRY=true E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v validatecluster/validatecluster_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/validatecluster && vagrant destroy -f'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v validatecluster/validatecluster_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
echo 'RUNNING SECRETS ENCRYPTION TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/secretsencryption && vagrant destroy -f'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v secretsencryption/secretsencryption_test.go -nodeOS="$4" -serverCount=$((servercount)) -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/secretsencryption && vagrant destroy -f'
echo 'RUN CLUSTER RESET TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v clusterreset/clusterreset_test.go -nodeOS="$4" -serverCount=3 -agentCount=1 -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/clusterreset && vagrant destroy -f'
echo 'RUNNING SPLIT SERVER VALIDATION TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v splitserver/splitserver_test.go -nodeOS="$4" -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/splitserver && vagrant destroy -f'
E2E_RELEASE_VERSION=$k3s_version && export E2E_RELEASE_VERSION
E2E_RELEASE_CHANNEL=$k3s_channel && export E2E_RELEASE_CHANNEL
echo 'RUNNING CLUSTER UPGRADE TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && E2E_REGISTRY=true /usr/local/go/bin/go test -v upgradecluster/upgradecluster_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/upgradecluster && vagrant destroy -f'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v upgradecluster/upgradecluster_test.go -nodeOS="$4" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h"
echo 'RUNNING DOCKER CRI VALIDATION TEST'
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 "cd k3s/tests/e2e && /usr/local/go/bin/go test -v docker/docker_test.go -nodeOS="$4" -serverCount=1 -agentCount=1 -timeout=1h"
ssh -i "$1" -o "StrictHostKeyChecking no" $2@$3 'cd k3s/tests/e2e/docker && vagrant destroy -f'

View File

@ -1,4 +1,4 @@
package validatecluster
package splitserver
import (
"flag"

View File

@ -31,7 +31,7 @@ var ci = flag.Bool("ci", false, "running on CI")
func Test_E2EUpgradeValidation(t *testing.T) {
RegisterFailHandler(Fail)
flag.Parse()
RunSpecs(t, "Create Cluster Test Suite")
RunSpecs(t, "Upgrade Cluster Test Suite")
}
var (