From 1298f19773574963b9ce5ba7ca3b1637d1a07ef6 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 23 Dec 2019 05:43:08 -0700 Subject: more BATS tests - run: --name (includes 'podman container exists' tests) - run: --pull (always, never, missing) - build: new test for ADD URL (#4420) - exec: new test for issue #4785 (pipe getting lost) - diff: new test - selinux (mostly copied from docker-autotest) Plus a bug fix: the wait_for_output() helper would continue checking, eventually timing out, even if the container had already exited (probably because of an error). Fix: as part of the loop, run 'podman inspect' and bail out if container is not running. Include exit code and logs. Signed-off-by: Ed Santiago --- test/system/070-build.bats | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'test/system/070-build.bats') diff --git a/test/system/070-build.bats b/test/system/070-build.bats index 7c39da72c..fd4ce03fc 100644 --- a/test/system/070-build.bats +++ b/test/system/070-build.bats @@ -40,7 +40,7 @@ EOF # Make an empty test directory, with a subdirectory used for tar tmpdir=$PODMAN_TMPDIR/build-test - run mkdir -p $tmpdir/subtest || die "Could not mkdir $tmpdir/subtest" + mkdir -p $tmpdir/subtest || die "Could not mkdir $tmpdir/subtest" echo "This is the ORIGINAL file" > $tmpdir/subtest/myfile1 run tar -C $tmpdir -cJf $tmpdir/myfile.tar.xz subtest @@ -80,6 +80,25 @@ EOF run_podman rmi -f build_test $iid } +@test "podman build - URLs" { + tmpdir=$PODMAN_TMPDIR/build-test + mkdir -p $tmpdir + + cat >$tmpdir/Dockerfile <