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
efa86a63
Unverified
Commit
efa86a63
authored
Jun 09, 2023
by
Derek Nola
Committed by
GitHub
Jun 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary daemonset addition/deletion (#7696)
Signed-off-by:
Derek Nola
<
derek.nola@suse.com
>
parent
7c151d46
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
28 deletions
+0
-28
testutils.go
tests/e2e/testutils.go
+0
-9
validatecluster_test.go
tests/e2e/validatecluster/validatecluster_test.go
+0
-19
No files found.
tests/e2e/testutils.go
View file @
efa86a63
...
...
@@ -214,15 +214,6 @@ func CreateLocalCluster(nodeOS string, serverCount, agentCount int) ([]string, [
return
serverNodeNames
,
agentNodeNames
,
nil
}
// Deletes the content of a manifest file previously applied
func
DeleteWorkload
(
workload
,
kubeconfig
string
)
error
{
cmd
:=
"kubectl delete -f "
+
workload
+
" --kubeconfig="
+
kubeconfig
if
_
,
err
:=
RunCommand
(
cmd
);
err
!=
nil
{
return
err
}
return
nil
}
func
DeployWorkload
(
workload
,
kubeconfig
string
,
hardened
bool
)
(
string
,
error
)
{
resourceDir
:=
"../amd64_resource_files"
if
hardened
{
...
...
tests/e2e/validatecluster/validatecluster_test.go
View file @
efa86a63
...
...
@@ -274,25 +274,6 @@ var _ = Describe("Verify Create", Ordered, func() {
})
Context
(
"Validate restart"
,
func
()
{
It
(
"Deletes daemonset"
,
func
()
{
_
,
err
:=
e2e
.
DeployWorkload
(
"daemonset.yaml"
,
kubeConfigFile
,
*
hardened
)
Expect
(
err
)
.
NotTo
(
HaveOccurred
(),
"Daemonset manifest not deployed"
)
defer
e2e
.
DeleteWorkload
(
"daemonset.yaml"
,
kubeConfigFile
)
nodes
,
_
:=
e2e
.
ParseNodes
(
kubeConfigFile
,
false
)
Eventually
(
func
(
g
Gomega
)
{
pods
,
_
:=
e2e
.
ParsePods
(
kubeConfigFile
,
false
)
count
:=
e2e
.
CountOfStringInSlice
(
"test-daemonset"
,
pods
)
g
.
Expect
(
len
(
nodes
))
.
Should
((
Equal
(
count
)),
"Daemonset pod count does not match node count"
)
podsRunning
:=
0
for
_
,
pod
:=
range
pods
{
if
strings
.
Contains
(
pod
.
Name
,
"test-daemonset"
)
&&
pod
.
Status
==
"Running"
&&
pod
.
Ready
==
"1/1"
{
podsRunning
++
}
}
g
.
Expect
(
len
(
nodes
))
.
Should
((
Equal
(
podsRunning
)),
"Daemonset running pods count does not match node count"
)
},
"620s"
,
"5s"
)
.
Should
(
Succeed
())
})
It
(
"Restarts normally"
,
func
()
{
errRestart
:=
e2e
.
RestartCluster
(
append
(
serverNodeNames
,
agentNodeNames
...
))
Expect
(
errRestart
)
.
NotTo
(
HaveOccurred
(),
"Restart Nodes not happened correctly"
)
...
...
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