diff --git a/tests/e2e/upgradecluster/upgradecluster_test.go b/tests/e2e/upgradecluster/upgradecluster_test.go index 033d3a051788..d5e77ae92661 100644 --- a/tests/e2e/upgradecluster/upgradecluster_test.go +++ b/tests/e2e/upgradecluster/upgradecluster_test.go @@ -12,7 +12,9 @@ import ( . "github.com/onsi/gomega" ) -// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64, dweomer/microos.amd64 +// Valid nodeOS: +// generic/ubuntu2004, generic/centos7, generic/rocky8 +// opensuse/Leap-15.3.x86_64, dweomer/microos.amd64 var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system") var serverCount = flag.Int("serverCount", 3, "number of server nodes") var agentCount = flag.Int("agentCount", 2, "number of agent nodes") @@ -156,9 +158,9 @@ var _ = Describe("Verify Upgrade", func() { Expect(err).NotTo(HaveOccurred(), "Daemonset manifest not deployed") nodes, _ := e2e.ParseNodes(kubeConfigFile, false) //nodes := - pods, _ := e2e.ParsePods(kubeConfigFile, false) Eventually(func(g Gomega) { + pods, _ := e2e.ParsePods(kubeConfigFile, false) count := e2e.CountOfStringInSlice("test-daemonset", pods) fmt.Println("POD COUNT") fmt.Println(count) @@ -344,9 +346,9 @@ var _ = Describe("Verify Upgrade", func() { It("After upgrade verifies Daemonset", func() { nodes, _ := e2e.ParseNodes(kubeConfigFile, false) //nodes := - pods, _ := e2e.ParsePods(kubeConfigFile, false) Eventually(func(g Gomega) { + pods, _ := e2e.ParsePods(kubeConfigFile, false) count := e2e.CountOfStringInSlice("test-daemonset", pods) fmt.Println("POD COUNT") fmt.Println(count) diff --git a/tests/e2e/vagrantdefaults.rb b/tests/e2e/vagrantdefaults.rb index 331fed01c4f4..99404041f978 100644 --- a/tests/e2e/vagrantdefaults.rb +++ b/tests/e2e/vagrantdefaults.rb @@ -5,6 +5,12 @@ def defaultOSConfigure(vm) vm.provision "Install jq", type: "shell", inline: "apt install -y jq" elsif box.include?("Leap") || box.include?("Tumbleweed") vm.provision "Install jq", type: "shell", inline: "zypper install -y jq" + elsif box.include?("rocky8") || box.include?("rocky9") + vm.provision "Install jq", type: "shell", inline: "dnf install -y jq" + vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld" + elsif box.include?("centos7") + vm.provision "Install jq", type: "shell", inline: "yum install -y jq" + vm.provision "Disable firewall", type: "shell", inline: "systemctl stop firewalld" elsif box.include?("alpine") vm.provision "Install tools", type: "shell", inline: "apk add jq coreutils" elsif box.include?("microos") diff --git a/tests/e2e/validatecluster/Vagrantfile b/tests/e2e/validatecluster/Vagrantfile index a213683e4457..6b2546d21fd2 100644 --- a/tests/e2e/validatecluster/Vagrantfile +++ b/tests/e2e/validatecluster/Vagrantfile @@ -123,7 +123,7 @@ def getDBType(role, role_num, vm) return "cluster-init: true" end elsif ( EXTERNAL_DB == "none" ) - # Use internal sqlite + # Use internal sqlite, only valid for single node clusters else puts "Unknown EXTERNAL_DB: " + EXTERNAL_DB abort diff --git a/tests/e2e/validatecluster/validatecluster_test.go b/tests/e2e/validatecluster/validatecluster_test.go index 65afc1d0c799..848a6c5aaa1f 100644 --- a/tests/e2e/validatecluster/validatecluster_test.go +++ b/tests/e2e/validatecluster/validatecluster_test.go @@ -12,15 +12,17 @@ import ( . "github.com/onsi/gomega" ) -// Valid nodeOS: generic/ubuntu2004, opensuse/Leap-15.3.x86_64, dweomer/microos.amd64 +// Valid nodeOS: +// generic/ubuntu2004, generic/centos7, generic/rocky8, +// opensuse/Leap-15.3.x86_64, dweomer/microos.amd64 var nodeOS = flag.String("nodeOS", "generic/ubuntu2004", "VM operating system") var serverCount = flag.Int("serverCount", 3, "number of server nodes") var agentCount = flag.Int("agentCount", 2, "number of agent nodes") var hardened = flag.Bool("hardened", false, "true or false") // Environment Variables Info: -// E2E_EXTERNAL_DB: mysql or postgres, nil for embedded etcd -// E2E_RELEASE_VERSION=v1.23.1+k3s2 or nil for latest commit from master +// E2E_EXTERNAL_DB: mysql, postgres, etcd (default: etcd) +// E2E_RELEASE_VERSION=v1.23.1+k3s2 (default: latest commit from master) func Test_E2EClusterValidation(t *testing.T) { RegisterFailHandler(Fail) @@ -173,9 +175,9 @@ var _ = Describe("Verify Create", func() { Expect(err).NotTo(HaveOccurred(), "Daemonset manifest not deployed") nodes, _ := e2e.ParseNodes(kubeConfigFile, false) - pods, _ := e2e.ParsePods(kubeConfigFile, false) Eventually(func(g Gomega) { + pods, _ := e2e.ParsePods(kubeConfigFile, false) count := e2e.CountOfStringInSlice("test-daemonset", pods) fmt.Println("POD COUNT") fmt.Println(count)