Skip to content

Commit

Permalink
[Release-1.28] Backport missing E2E PRs (#7206)
Browse files Browse the repository at this point in the history
* Refactor run_tests.sh script (#6280)

* Improve run_tests script

Signed-off-by: Manuel Buil <[email protected]>

* Upgrade tests to ubuntu2310 and use nodeOS var

Signed-off-by: Manuel Buil <[email protected]>

---------

Signed-off-by: Manuel Buil <[email protected]>

* Update vagrant OS boxes

Signed-off-by: Derek Nola <[email protected]>

* Add cleanup to e2e tests in vagrant env (#6961)

Signed-off-by: ShylajaDevadiga <[email protected]>

* Remove dereknola debug action

Signed-off-by: Derek Nola <[email protected]>

---------

Signed-off-by: Manuel Buil <[email protected]>
Signed-off-by: Derek Nola <[email protected]>
Signed-off-by: ShylajaDevadiga <[email protected]>
Co-authored-by: Manuel Buil <[email protected]>
Co-authored-by: Shylaja Devadiga <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 2699795 commit 41898fa
Show file tree
Hide file tree
Showing 29 changed files with 109 additions and 89 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
fail-fast: false
matrix:
channel: [stable]
vm: [centos-7, rocky-8, opensuse-leap, ubuntu-2004, windows-2019, windows-2022]
vm: [centos-9, rocky-8, opensuse-leap, ubuntu-2404, windows-2019, windows-2022]
include:
- {channel: latest, vm: rocky-8}
- {channel: latest, vm: ubuntu-2004}
- {channel: latest, vm: ubuntu-2404}
max-parallel: 2
defaults:
run:
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ jobs:
- name: On Failure, Dump Server Logs
if: ${{ failure() }}
run: cat ./tests/integration/${{ matrix.itest }}/r2log.txt
- name: On Failure, Launch Debug Session
uses: dereknola/[email protected]
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
limit-access-to-actor: true

e2e:
name: "E2E Tests"
Expand Down Expand Up @@ -168,11 +161,4 @@ jobs:
- name: Run ${{ matrix.etest }} Test
run: |
cd tests/e2e/${{ matrix.etest }}
go test -v -timeout=45m ./${{ matrix.etest}}_test.go -ci -local
- name: On Failure, Launch Debug Session
uses: dereknola/[email protected]
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
limit-access-to-actor: true
go test -v -timeout=45m ./${{ matrix.etest}}_test.go -ci -local
2 changes: 1 addition & 1 deletion tests/e2e/ciliumnokp/Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] || ["server-0", "agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['generic/ubuntu2310', 'generic/ubuntu2310'])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/ciliumnokp/ciliumnokp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

var nodeOS = flag.String("nodeOS", "generic/ubuntu2310", "VM operating system")
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 1, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/createreport/launchresults.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<body>
<h1>
</h1>
<p class="center"> Ubuntu 20.04 Test Results </p>
<iframe src="./rke2_ubuntu2004_results.html"
<p class="center"> Ubuntu 23.10 Test Results </p>
<iframe src="./rke2_ubuntu2310_results.html"
height="500px" width="1850px">
</iframe>
<p class="center"> Rocky Linux8.7 Test Results </p>
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/dnscache/Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] || ["server-0", "agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['generic/ubuntu2004', 'generic/ubuntu2004'])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/dnscache/dnscache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 1, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/dualstack/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-0", "server-1", "server-2", "agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/dualstack/dualstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 3, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/mixedos/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-0", "linux-agent-0", "windows-agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'jborean93/WindowsServer2022'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'jborean93/WindowsServer2022'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/mixedos/mixedos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "operating system for linux nodes")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "operating system for linux nodes")
var serverCount = flag.Int("serverCount", 1, "number of server nodes")
var linuxAgentCount = flag.Int("linuxAgentCount", 0, "number of linux agent nodes")
var windowsAgentCount = flag.Int("windowsAgentCount", 1, "number of windows agent nodes")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/mixedosbgp/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-0", "linux-agent-0", "windows-agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'jborean93/WindowsServer2022'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'jborean93/WindowsServer2022'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/mixedosbgp/mixedosbgp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "operating system for linux nodes")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "operating system for linux nodes")
var serverCount = flag.Int("serverCount", 1, "number of server nodes")
var linuxAgentCount = flag.Int("linuxAgentCount", 1, "number of linux agent nodes")
var windowsAgentCount = flag.Int("windowsAgentCount", 1, "number of windows agent nodes")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/multus/Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] || ["server-0", "agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['generic/ubuntu2004', 'generic/ubuntu2004'])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] || ['bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/multus/multus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 1, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
17 changes: 16 additions & 1 deletion tests/e2e/scripts/latest_commit.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#!/bin/bash
# Grabs the last 5 commit SHA's from the given branch, then purges any commits that do not have a passing CI build
iterations=0
curl -s -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/rancher/rke2/commits?per_page=5&sha=$1" | jq -r '.[] | .sha' &> "$2"
response=$(curl -s -H 'Accept: application/vnd.github.v3+json' "https://api.github.com/repos/rancher/rke2/commits?per_page=5&sha=$1")
type=$(echo "$response" | jq -r type)

# Verify if the response is an array with the rke2 commits
if [[ $type == "object" ]]; then
message=$(echo "$response" | jq -r .message)
if [[ $message == "API rate limit exceeded for "* ]]; then
echo "Github API rate limit exceeded"
exit 1
fi
echo "Github API returned a non-expected response ${message}"
exit 1
elif [[ $type == "array" ]]; then
echo ${response} | jq -r '.[] | .sha' &> "$2"
fi

curl -s --fail https://rke2-ci-builds.s3.amazonaws.com/rke2-images.linux-amd64-$(head -n 1 $2).tar.zst.sha256sum
while [ $? -ne 0 ]; do
((iterations++))
Expand Down
91 changes: 55 additions & 36 deletions tests/e2e/scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,62 +1,81 @@
#!/bin/bash
nodeOS=${1:-"generic/ubuntu2004"}
servercount=${2:-3}
agentcount=${3:-1}
db=${4:-"etcd"}
hardened=${5:-""}
rke2_version=${rke2_version}
rke2_channel=${rke2_channel:-"commit"}

E2E_EXTERNAL_DB=$db && export E2E_EXTERNAL_DB
E2E_REGISTRY=true && export E2E_REGISTRY

cd
cd rke2 && git pull --rebase origin master
/usr/local/go/bin/go mod tidy
# Usage: ./run_tests.sh
# This script runs all the rke2 e2e tests and generates a report with the log
# The generated log is placed in createreport/rke2_${OS}.log
#
# This script must be run inside the rke2 directory where the tests exist
#
# Example:
# To run the script with default settings:
# ./run_tests.sh
#
set -x

cd tests/e2e
# tests to run
tests=("ciliumnokp" "dnscache" "dualstack" "mixedos" "mixedosbgp" "multus" "secretsencryption" "splitserver" "upgradecluster" "validatecluster")
nodeOS=${1:-"bento/ubuntu-24.04"}
OS=$(echo "$nodeOS"|cut -d'/' -f2)
echo "$OS"

E2E_REGISTRY=true && export E2E_REGISTRY
cd rke2
git pull --rebase origin master
/usr/local/go/bin/go mod tidy
cd tests/e2e
# create directory to store reports if it does not exists
if [ ! -d createreport ]
then
mkdir createreport
fi

count=0
run_tests(){
count=$(( count + 1 ))
vagrant global-status | awk '/running/'|cut -c1-7| xargs -r -d '\n' -n 1 -- vagrant destroy -f
cleanup() {
for net in $(virsh net-list --all | tail -n +2 | tr -s ' ' | cut -d ' ' -f2 | grep -v default); do
virsh net-destroy "$net"
virsh net-undefine "$net"
done

E2E_RELEASE_VERSION=$rke2_version && export E2E_RELEASE_VERSION
E2E_RELEASE_CHANNEL=$rke2_channel && export E2E_RELEASE_CHANNEL
for domain in $(virsh list --all | tail -n +2 | tr -s ' ' | cut -d ' ' -f3); do
virsh destroy "$domain"
virsh undefine "$domain" --remove-all-storage
done

for vm in `vagrant global-status |tr -s ' '|tail +3 |grep "/" |cut -d ' ' -f5`; do
cd $vm
vagrant destroy -f
cd ..
done
}

echo 'RUNNING CLUSTER UPGRADE TEST'
E2E_REGISTRY=true /usr/local/go/bin/go test -v ./upgradecluster/upgradecluster_test.go -nodeOS="$nodeOS" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=1h -json -ci |tee createreport/rke2_"$OS".log

echo 'RUNNING DUALSTACK VALIDATION TEST'
E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v dualstack/dualstack_test.go -nodeOS="$nodeOS" -serverCount=1 -agentCount=1 -timeout=30m -json -ci |tee -a createreport/rke2_"$OS".log
# Remove VMs which are in invalid state
vagrant global-status --prune

count=0
run_tests(){

echo 'RUNNING CLUSTER VALIDATION TEST'
E2E_REGISTRY=true E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v validatecluster/validatecluster_test.go -nodeOS="$nodeOS" -serverCount=$((servercount)) -agentCount=$((agentcount)) -timeout=30m -json -ci |tee -a createreport/rke2_"$OS".log
count=$(( count + 1 ))
rm createreport/rke2_${OS}.log 2>/dev/null

echo 'RUNNING MIXEDOS TEST'
/usr/local/go/bin/go test -v mixedos/mixedos_test.go -nodeOS="$nodeOS" -serverCount=$((servercount)) -timeout=1h -json -ci |tee -a createreport/rke2_"$OS".log
for i in ${!tests[@]}; do
pushd ${tests[$i]}
vagrant destroy -f

echo 'RUNNING SPLIT SERVER VALIDATION TEST'
E2E_HARDENED="$hardened" /usr/local/go/bin/go test -v splitserver/splitserver_test.go -nodeOS="$nodeOS" -timeout=30m -json -ci |tee -a createreport/rke2_"$OS".log
echo "RUNNING ${tests[$i]} TEST"
/usr/local/go/bin/go test -v ${tests[$i]}_test.go -timeout=2h -nodeOS="$nodeOS" -json -ci |tee -a ../createreport/rke2_${OS}.log

popd
done
}

ls createreport/rke2_"$OS".log 2>/dev/null && rm createreport/rke2_"$OS".log
ls createreport/rke2_${OS}.log 2>/dev/null && rm createreport/rke2_${OS}.log
cleanup
run_tests

# re-run test if first run fails and keep record of repeatedly failed test to debug
while [ -f createreport/rke2_"$OS".log ] && grep -w ":fail" createreport/rke2_"$OS".log && [ $count -le 2 ]
while [ -f createreport/rke2_${OS}.log ] && grep -w " FAIL:" createreport/rke2_${OS}.log && [ $count -le 2 ]
do
cp createreport/rke2_"$OS".log createreport/rke2_"$OS"_"$count".log
cp createreport/rke2_${OS}.log createreport/rke2_${OS}_${count}.log
run_tests
done

# Generate report and upload to s3 bucket
cd createreport && /usr/local/go/bin/go run -v report-template-bindata.go generate_report.go -f rke2_"OS".log
cd createreport && /usr/local/go/bin/go run -v report-template-bindata.go generate_report.go -f rke2_${OS}.log
2 changes: 1 addition & 1 deletion tests/e2e/splitserver/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-etcd-0", "server-cp-0", "server-cp-1", "agent-0"])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/splitserver/splitserver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var etcdCount = flag.Int("etcdCount", 1, "number of server nodes only deploying etcd")
var controlPlaneCount = flag.Int("controlPlaneCount", 1, "number of server nodes acting as control plane")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/upgradecluster/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-0", "server-1", "server-2", "agent-0"])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
RELEASE_CHANNEL = (ENV['E2E_RELEASE_CHANNEL'] || "latest")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/upgradecluster/upgradecluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 3, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/vagrantdefaults.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def defaultOSConfigure(vm)
box = vm.box.to_s
if box.include?("generic/ubuntu")
if box.include?("ubuntu")
vm.provision "netplan dns", type: "shell", inline: "netplan set ethernets.eth0.nameservers.addresses=[8.8.8.8,1.1.1.1]; netplan apply", run: 'once'
vm.provision "Install jq", type: "shell", inline: "apt-get install -y jq", run: 'once'
elsif box.include?("Leap") || box.include?("Tumbleweed")
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/validatecluster/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENV['VAGRANT_NO_PARALLEL'] = ENV['E2E_STANDUP_PARALLEL'] ? nil : 'no'
NODE_ROLES = (ENV['E2E_NODE_ROLES'] ||
["server-0", "server-1", "server-2", "agent-0" ])
NODE_BOXES = (ENV['E2E_NODE_BOXES'] ||
['generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004', 'generic/ubuntu2004'])
['bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04', 'bento/ubuntu-24.04'])
GITHUB_BRANCH = (ENV['E2E_GITHUB_BRANCH'] || "master")
RELEASE_VERSION = (ENV['E2E_RELEASE_VERSION'] || "")
NODE_CPUS = (ENV['E2E_NODE_CPUS'] || 2).to_i
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/validatecluster/validatecluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/rancher/rke2/tests/e2e"
)

// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64
var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system")
// Valid nodeOS: bento/ubuntu-24.04, opensuse/Leap-15.6.x86_64
var nodeOS = flag.String("nodeOS", "bento/ubuntu-24.04", "VM operating system")
var serverCount = flag.Int("serverCount", 3, "number of server nodes")
var agentCount = flag.Int("agentCount", 1, "number of agent nodes")
var ci = flag.Bool("ci", false, "running on CI")
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ENV['TEST_INSTALL_SH'] ||= '../../../install.sh'

Vagrant.configure("2") do |config|
config.vm.box = "generic/centos7"
config.vm.box = "eurolinux-vagrant/centos-stream-9"
config.vm.boot_timeout = ENV['TEST_VM_BOOT_TIMEOUT'] || 600 # seconds
config.vm.synced_folder '.', '/vagrant', type: 'rsync', disabled: false
%w[libvirt virtualbox vmware_desktop].each do |p|
Expand All @@ -20,7 +20,7 @@ Vagrant.configure("2") do |config|
external_env = ""
ENV.select{|k,v| k.start_with?('RKE2_') || k.start_with?('INSTALL_RKE2_')}.each {|key,value| external_env << "#{key.to_s}=#{value.to_s}"}

config.vm.define "install-centos-7", primary: true do |test|
config.vm.define "install-centos-9", primary: true do |test|
test.vm.hostname = 'smoke'
test.vm.provision 'rke2-upload-installer', type: 'file', run: 'always', source: ENV['TEST_INSTALL_SH'], destination: 'install.sh'
test.vm.provision"rke2-install", type: 'rke2', run: "once" do |rke2|
Expand Down
Loading

0 comments on commit 41898fa

Please sign in to comment.