e2e: fix some tests on remote

- podman-remote unshare returns an error message
  with the exit code '125'.

- Need to run RestartRemoteService() to apply
  changes to the TMPDIR.

Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
This commit is contained in:
Toshiki Sonoda
2023-02-08 18:07:41 +09:00
parent 3f45a8babf
commit 43b3570680
2 changed files with 5 additions and 2 deletions

View File

@ -426,6 +426,9 @@ var _ = Describe("Verify podman containers.conf usage", func() {
} else {
defer os.Unsetenv("TMPDIR")
}
if IsRemote() {
podmanTest.RestartRemoteService()
}
session := podmanTest.Podman([]string{"info", "--format", "{{.Store.ImageCopyTmpDir}}"})
session.WaitWithDefaultTimeout()

View File

@ -94,7 +94,7 @@ var _ = Describe("Podman unshare", func() {
SkipIfNotRemote("check for podman-remote unshare error")
session := podmanTest.Podman([]string{"unshare"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.OutputToString()).To(Equal(`Error: cannot use command "podman-remote unshare" with the remote podman client`))
Expect(session).Should(Exit(125))
Expect(session.ErrorToString()).To(Equal(`Error: cannot use command "podman-remote unshare" with the remote podman client`))
})
})