Skip to content

Commit

Permalink
Put cleanup in teardown function
Browse files Browse the repository at this point in the history
  • Loading branch information
Liujingfang1 committed May 22, 2018
1 parent 81f8918 commit 99cd798
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samples/memcached-api-server/memcached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ func setup() {
projectDir := filepath.Dir(filename)
kubebuilderBin := "/tmp/kubebuilder/bin"
kubebuilderTest = e2e.NewKubebuilderTest(projectDir, kubebuilderBin)
kubebuilderTest.CleanUp()
}

func teardown() {
kubebuilderTest.CleanUp()
}

func TestMain(m *testing.M) {
setup()
code := m.Run()
teardown()
os.Exit(code)
}

Expand Down

0 comments on commit 99cd798

Please sign in to comment.