test: gracefully terminate server

send a SIGTERM to the server process instead of killing it so it has
time to do a proper cleanup and don't leak the home mount.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2024-07-14 19:45:01 +02:00
parent fbc4768a00
commit e16e528f39
No known key found for this signature in database
GPG Key ID: 67E38F7A8BA21772
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ func (p *PodmanTestIntegration) StartRemoteService() {
}
func (p *PodmanTestIntegration) StopRemoteService() {
if err := p.RemoteSession.Kill(); err != nil {
if err := p.RemoteSession.Signal(syscall.SIGTERM); err != nil {
GinkgoWriter.Printf("unable to clean up service %d, %v\n", p.RemoteSession.Pid, err)
}
if _, err := p.RemoteSession.Wait(); err != nil {