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
0d05ece7
Commit
0d05ece7
authored
Jun 13, 2016
by
Random-Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it blocks in NodeProblemDetector e2e test serial.
parent
0d02f8c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
node_problem_detector.go
test/e2e/node_problem_detector.go
+5
-9
No files found.
test/e2e/node_problem_detector.go
View file @
0d05ece7
...
...
@@ -193,18 +193,16 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() {
Expect
(
f
.
WaitForPodRunning
(
name
))
.
To
(
Succeed
())
})
It
(
"should generate
default node condition after started
"
,
func
()
{
It
(
"should generate
node condition and events for corresponding errors
"
,
func
()
{
By
(
"Make sure no events are generated"
)
Consistently
(
func
()
error
{
return
verifyNoEvents
(
c
.
Events
(
eventNamespace
),
eventListOptions
)
},
pollConsistent
,
pollInterval
)
.
Should
(
Succeed
())
By
(
"Make sure the node condition is false"
)
By
(
"Make sure the
default
node condition is false"
)
Consistently
(
func
()
error
{
return
verifyCondition
(
c
.
Nodes
(),
node
.
Name
,
condition
,
api
.
ConditionFalse
,
defaultReason
,
defaultMessage
)
},
pollConsistent
,
pollInterval
)
.
Should
(
Succeed
())
})
It
(
"should generate event when temporary error happens"
,
func
()
{
num
:=
3
By
(
fmt
.
Sprintf
(
"Inject %d temporary errors"
,
num
))
Expect
(
framework
.
IssueSSHCommand
(
injectCommand
(
tempMessage
,
num
),
framework
.
TestContext
.
Provider
,
node
))
.
To
(
Succeed
())
...
...
@@ -216,20 +214,18 @@ var _ = framework.KubeDescribe("NodeProblemDetector", func() {
Consistently
(
func
()
error
{
return
verifyEvents
(
c
.
Events
(
eventNamespace
),
eventListOptions
,
num
,
tempReason
,
tempMessage
)
},
pollConsistent
,
pollInterval
)
.
Should
(
Succeed
())
By
(
"Make sure the node condition is false"
)
By
(
"Make sure the node condition is
still
false"
)
Expect
(
verifyCondition
(
c
.
Nodes
(),
node
.
Name
,
condition
,
api
.
ConditionFalse
,
defaultReason
,
defaultMessage
))
.
To
(
Succeed
())
})
It
(
"should generate node condition when permanent error happens"
,
func
()
{
By
(
"Inject 1 permanent error"
)
Expect
(
framework
.
IssueSSHCommand
(
injectCommand
(
permMessage
,
1
),
framework
.
TestContext
.
Provider
,
node
))
.
To
(
Succeed
())
By
(
"Make sure the corresponding node condition is generated"
)
Eventually
(
func
()
error
{
return
verifyCondition
(
c
.
Nodes
(),
node
.
Name
,
condition
,
api
.
ConditionTrue
,
permReason
,
permMessage
)
},
pollTimeout
,
pollInterval
)
.
Should
(
Succeed
())
By
(
"Make sure no events are generated"
)
By
(
"Make sure no
new
events are generated"
)
Consistently
(
func
()
error
{
return
verify
NoEvents
(
c
.
Events
(
eventNamespace
),
eventListOptions
)
return
verify
Events
(
c
.
Events
(
eventNamespace
),
eventListOptions
,
num
,
tempReason
,
tempMessage
)
},
pollConsistent
,
pollInterval
)
.
Should
(
Succeed
())
})
...
...
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