Skip to content

Commit

Permalink
stop podman service in e2e tests
Browse files Browse the repository at this point in the history
when running e2e tests, each test knows to stop its service when running remote; however, during setup and teardown remote services were not being killed when we were done with them.

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude authored and mheon committed Jul 6, 2020
1 parent 06b5a8c commit 637ff7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/e2e/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ var _ = SynchronizedBeforeSuite(func() []byte {
fmt.Println(err)
os.Exit(1)
}

// If running remote, we need to stop the associated podman system service
if podman.RemoteTest {
podman.StopRemoteService()
}

return []byte(path)
}, func(data []byte) {
LockTmpDir = string(data)
Expand Down Expand Up @@ -173,6 +179,10 @@ var _ = SynchronizedAfterSuite(func() {},
fmt.Printf("%q\n", err)
}

// If running remote, we need to stop the associated podman system service
if podmanTest.RemoteTest {
podmanTest.StopRemoteService()
}
// for localized tests, this removes the image cache dir and for remote tests
// this is a no-op
removeCache()
Expand Down

0 comments on commit 637ff7b

Please sign in to comment.