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
90f8d622
Commit
90f8d622
authored
Apr 05, 2017
by
Kris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure Teardown is called.
This will ensure that tests get a chance to clean up resources even if setup failed part way through.
parent
176eb0e5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
cluster_upgrade.go
test/e2e/cluster_upgrade.go
+1
-1
upgrade.go
test/e2e/upgrades/upgrade.go
+3
-2
No files found.
test/e2e/cluster_upgrade.go
View file @
90f8d622
...
@@ -209,8 +209,8 @@ func (cma *chaosMonkeyAdapter) Test(sem *chaosmonkey.Semaphore) {
...
@@ -209,8 +209,8 @@ func (cma *chaosMonkeyAdapter) Test(sem *chaosmonkey.Semaphore) {
return
return
}
}
cma
.
test
.
Setup
(
cma
.
framework
)
defer
cma
.
test
.
Teardown
(
cma
.
framework
)
defer
cma
.
test
.
Teardown
(
cma
.
framework
)
cma
.
test
.
Setup
(
cma
.
framework
)
sem
.
Ready
()
sem
.
Ready
()
cma
.
test
.
Test
(
cma
.
framework
,
sem
.
StopCh
,
cma
.
upgradeType
)
cma
.
test
.
Test
(
cma
.
framework
,
sem
.
StopCh
,
cma
.
upgradeType
)
}
}
...
...
test/e2e/upgrades/upgrade.go
View file @
90f8d622
...
@@ -56,8 +56,9 @@ type Test interface {
...
@@ -56,8 +56,9 @@ type Test interface {
// begin.
// begin.
Test
(
f
*
framework
.
Framework
,
done
<-
chan
struct
{},
upgrade
UpgradeType
)
Test
(
f
*
framework
.
Framework
,
done
<-
chan
struct
{},
upgrade
UpgradeType
)
// TearDown should clean up any objects that are created that
// Teardown should clean up any objects that are created that
// aren't already cleaned up by the framework.
// aren't already cleaned up by the framework. This will
// always be called, even if Setup failed.
Teardown
(
f
*
framework
.
Framework
)
Teardown
(
f
*
framework
.
Framework
)
}
}
...
...
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