summaryrefslogtreecommitdiff
path: root/test/system/070-build.bats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-01-15 23:33:02 +0100
committerGitHub <noreply@github.com>2020-01-15 23:33:02 +0100
commit0870e88ff48eaf6b5624044b7cd2bc35cff85150 (patch)
treee0cd9d15cda69ffa8818cb84a5554ee48f41ca29 /test/system/070-build.bats
parent978b891c8d2ffa7d52d872625a9ce3816c90334c (diff)
parent1298f19773574963b9ce5ba7ca3b1637d1a07ef6 (diff)
downloadpodman-0870e88ff48eaf6b5624044b7cd2bc35cff85150.tar.gz
podman-0870e88ff48eaf6b5624044b7cd2bc35cff85150.tar.bz2
podman-0870e88ff48eaf6b5624044b7cd2bc35cff85150.zip
Merge pull request #4824 from edsantiago/bats
more BATS tests
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r--test/system/070-build.bats21
1 files changed, 20 insertions, 1 deletions
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 <<EOF
+FROM $IMAGE
+ADD https://github.com/containers/libpod/blob/master/README.md /tmp/
+EOF
+ run_podman build -t add_url $tmpdir
+ run_podman run --rm add_url stat /tmp/README.md
+ run_podman rmi -f add_url
+
+ # Now test COPY. That should fail.
+ sed -i -e 's/ADD/COPY/' $tmpdir/Dockerfile
+ run_podman 125 build -t copy_url $tmpdir
+ is "$output" ".*error building at STEP .*: source can't be a URL for COPY"
+}
+
+
function teardown() {
# A timeout or other error in 'build' can leave behind stale images
# that podman can't even see and which will cascade into subsequent