diff options
author | Ed Santiago <santiago@redhat.com> | 2019-03-05 09:58:30 -0700 |
---|---|---|
committer | Ed Santiago <santiago@redhat.com> | 2019-03-07 14:09:00 -0700 |
commit | 589248d2f359dea73fc763ac587e2927f005b300 (patch) | |
tree | 089364b57364c0d77d1afac4d0193915a221371a /test/system/070-build.bats | |
parent | 681eae9bcc856f8dad107765a97c29d0fe093d4a (diff) | |
download | podman-589248d2f359dea73fc763ac587e2927f005b300.tar.gz podman-589248d2f359dea73fc763ac587e2927f005b300.tar.bz2 podman-589248d2f359dea73fc763ac587e2927f005b300.zip |
Implement review feedback
- document a recommended convention for fail-fast tests
- document the requirement for jq. (And, add a fail-fast
test for its presence; remove the duplicated checks
in subtests)
- add further sanity checks to 'help' test. Add missing
documentation. Remove a no-longer-needed workaround for
usage-message bug fixed in #2486
- add a documented TEMPLATE
- and, since we're at 1.1, enable 'Remote API' check in
version test
- better diagnostics in setup/teardown; add vim filetype hint;
better formatting of actual-vs-expect errors
- new pod-top, logs, build tests
- improve error messages
- add $IMAGE alias for ridiculous $PODMAN_TEST_IMAGE_FQN
- final cleanup, in prep for merge
Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r-- | test/system/070-build.bats | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats new file mode 100644 index 000000000..25eb36c58 --- /dev/null +++ b/test/system/070-build.bats @@ -0,0 +1,28 @@ +#!/usr/bin/env bats -*- bats -*- +# +# Tests for podman build +# + +load helpers + +@test "podman build - basic test" { + rand_filename=$(random_string 20) + rand_content=$(random_string 50) + + tmpdir=$PODMAN_TMPDIR/build-test + run mkdir -p $tmpdir || die "Could not mkdir $tmpdir" + dockerfile=$tmpdir/Dockerfile + cat >$dockerfile <<EOF +FROM $IMAGE +RUN echo $rand_content > /$rand_filename +EOF + + run_podman build -t build_test --format=docker $tmpdir + + run_podman run --rm build_test cat /$rand_filename + is "$output" "$rand_content" "reading generated file in image" + + run_podman rmi build_test +} + +# vim: filetype=sh |