test/e2e/run: don't use date +%N on Alpine

Commit e1443fe05d146def6 added a test case that ran "date +%N" inside
a Fedora container (without actually using its output).

Commit ccc5bc167fa2c140 changed that test case to use Alpine. Problem
is, %N is not supported by date in Alpine (it only prints a newline).

To eliminate the ambiguity, replace date with touch.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-01-04 17:28:10 -08:00
parent ec9d67b7e4
commit cf7fc36953

View File

@ -1315,7 +1315,7 @@ USER mail`, BB)
Expect(err).To(BeNil())
file.Close()
session := podmanTest.Podman([]string{"run", "-dt", "--restart", "always", "-v", fmt.Sprintf("%s:/tmp/runroot:Z", testDir), ALPINE, "sh", "-c", "date +%N > /tmp/runroot/ran && while test -r /tmp/runroot/running; do sleep 0.1s; done"})
session := podmanTest.Podman([]string{"run", "-dt", "--restart", "always", "-v", fmt.Sprintf("%s:/tmp/runroot:Z", testDir), ALPINE, "sh", "-c", "touch /tmp/runroot/ran && while test -r /tmp/runroot/running; do sleep 0.1s; done"})
found := false
testFile := filepath.Join(testDir, "ran")