Commit 57d8e6f8 authored by Derek Nola's avatar Derek Nola

E2E: Add support for CentOS 7 and Rocky 8 (#6015)

* Add e2e support for centos7 and rocky8 Signed-off-by: 's avatarDerek Nola <derek.nola@suse.com>
parent 3f017c98
......@@ -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)
......
......@@ -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")
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment