Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
57d8e6f8
Commit
57d8e6f8
authored
Aug 26, 2022
by
Derek Nola
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
E2E: Add support for CentOS 7 and Rocky 8 (#6015)
* Add e2e support for centos7 and rocky8 Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
3f017c98
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
8 deletions
+18
-8
upgradecluster_test.go
tests/e2e/upgradecluster/upgradecluster_test.go
+5
-3
vagrantdefaults.rb
tests/e2e/vagrantdefaults.rb
+6
-0
Vagrantfile
tests/e2e/validatecluster/Vagrantfile
+1
-1
validatecluster_test.go
tests/e2e/validatecluster/validatecluster_test.go
+6
-4
No files found.
tests/e2e/upgradecluster/upgradecluster_test.go
View file @
57d8e6f8
...
@@ -12,7 +12,9 @@ import (
...
@@ -12,7 +12,9 @@ import (
.
"github.com/onsi/gomega"
.
"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
nodeOS
=
flag
.
String
(
"nodeOS"
,
"generic/ubuntu2004"
,
"VM operating system"
)
var
serverCount
=
flag
.
Int
(
"serverCount"
,
3
,
"number of server nodes"
)
var
serverCount
=
flag
.
Int
(
"serverCount"
,
3
,
"number of server nodes"
)
var
agentCount
=
flag
.
Int
(
"agentCount"
,
2
,
"number of agent nodes"
)
var
agentCount
=
flag
.
Int
(
"agentCount"
,
2
,
"number of agent nodes"
)
...
@@ -156,9 +158,9 @@ var _ = Describe("Verify Upgrade", func() {
...
@@ -156,9 +158,9 @@ var _ = Describe("Verify Upgrade", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Daemonset manifest not deployed"
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Daemonset manifest not deployed"
)
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
//nodes :=
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
//nodes :=
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
Eventually
(
func
(
g
Gomega
)
{
Eventually
(
func
(
g
Gomega
)
{
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
count
)
fmt
.
Println
(
count
)
...
@@ -344,9 +346,9 @@ var _ = Describe("Verify Upgrade", func() {
...
@@ -344,9 +346,9 @@ var _ = Describe("Verify Upgrade", func() {
It
(
"After upgrade verifies Daemonset"
,
func
()
{
It
(
"After upgrade verifies Daemonset"
,
func
()
{
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
//nodes :=
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
//nodes :=
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
Eventually
(
func
(
g
Gomega
)
{
Eventually
(
func
(
g
Gomega
)
{
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
count
)
fmt
.
Println
(
count
)
...
...
tests/e2e/vagrantdefaults.rb
View file @
57d8e6f8
...
@@ -5,6 +5,12 @@ def defaultOSConfigure(vm)
...
@@ -5,6 +5,12 @@ def defaultOSConfigure(vm)
vm
.
provision
"Install jq"
,
type:
"shell"
,
inline:
"apt install -y jq"
vm
.
provision
"Install jq"
,
type:
"shell"
,
inline:
"apt install -y jq"
elsif
box
.
include?
(
"Leap"
)
||
box
.
include?
(
"Tumbleweed"
)
elsif
box
.
include?
(
"Leap"
)
||
box
.
include?
(
"Tumbleweed"
)
vm
.
provision
"Install jq"
,
type:
"shell"
,
inline:
"zypper install -y jq"
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"
)
elsif
box
.
include?
(
"alpine"
)
vm
.
provision
"Install tools"
,
type:
"shell"
,
inline:
"apk add jq coreutils"
vm
.
provision
"Install tools"
,
type:
"shell"
,
inline:
"apk add jq coreutils"
elsif
box
.
include?
(
"microos"
)
elsif
box
.
include?
(
"microos"
)
...
...
tests/e2e/validatecluster/Vagrantfile
View file @
57d8e6f8
...
@@ -123,7 +123,7 @@ def getDBType(role, role_num, vm)
...
@@ -123,7 +123,7 @@ def getDBType(role, role_num, vm)
return
"cluster-init: true"
return
"cluster-init: true"
end
end
elsif
(
EXTERNAL_DB
==
"none"
)
elsif
(
EXTERNAL_DB
==
"none"
)
# Use internal sqlite
# Use internal sqlite
, only valid for single node clusters
else
else
puts
"Unknown EXTERNAL_DB: "
+
EXTERNAL_DB
puts
"Unknown EXTERNAL_DB: "
+
EXTERNAL_DB
abort
abort
...
...
tests/e2e/validatecluster/validatecluster_test.go
View file @
57d8e6f8
...
@@ -12,15 +12,17 @@ import (
...
@@ -12,15 +12,17 @@ import (
.
"github.com/onsi/gomega"
.
"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
nodeOS
=
flag
.
String
(
"nodeOS"
,
"generic/ubuntu2004"
,
"VM operating system"
)
var
serverCount
=
flag
.
Int
(
"serverCount"
,
3
,
"number of server nodes"
)
var
serverCount
=
flag
.
Int
(
"serverCount"
,
3
,
"number of server nodes"
)
var
agentCount
=
flag
.
Int
(
"agentCount"
,
2
,
"number of agent nodes"
)
var
agentCount
=
flag
.
Int
(
"agentCount"
,
2
,
"number of agent nodes"
)
var
hardened
=
flag
.
Bool
(
"hardened"
,
false
,
"true or false"
)
var
hardened
=
flag
.
Bool
(
"hardened"
,
false
,
"true or false"
)
// Environment Variables Info:
// Environment Variables Info:
// E2E_EXTERNAL_DB: mysql
or postgres, nil for embedded etcd
// E2E_EXTERNAL_DB: mysql
, postgres, etcd (default: etcd)
// E2E_RELEASE_VERSION=v1.23.1+k3s2
or nil for latest commit from master
// E2E_RELEASE_VERSION=v1.23.1+k3s2
(default: latest commit from master)
func
Test_E2EClusterValidation
(
t
*
testing
.
T
)
{
func
Test_E2EClusterValidation
(
t
*
testing
.
T
)
{
RegisterFailHandler
(
Fail
)
RegisterFailHandler
(
Fail
)
...
@@ -173,9 +175,9 @@ var _ = Describe("Verify Create", func() {
...
@@ -173,9 +175,9 @@ var _ = Describe("Verify Create", func() {
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Daemonset manifest not deployed"
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Daemonset manifest not deployed"
)
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
Eventually
(
func
(
g
Gomega
)
{
Eventually
(
func
(
g
Gomega
)
{
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
"POD COUNT"
)
fmt
.
Println
(
count
)
fmt
.
Println
(
count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment