Skip to content

Commit

Permalink
tests: Add a test for inheritance order of postprocess
Browse files Browse the repository at this point in the history
Since I got it backwards when rewriting it in Rust.
  • Loading branch information
cgwalters committed Oct 3, 2018
1 parent edb3edf commit e771a99
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/compose-tests/test-misc-tweaks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ pysetjsonmember "postprocess-script" \"$PWD/postprocess.sh\"
pysetjsonmember "postprocess" '["""#!/bin/bash
touch /usr/share/postprocess-testing""",
"""#!/bin/bash
set -xeuo pipefail
touch /usr/share/included-postprocess-test
rm /usr/share/postprocess-testing
touch /usr/share/postprocess-testing-done"""]'
cat > postprocess.sh << EOF
Expand All @@ -45,6 +47,18 @@ echo baz > composedata/baz.txt
# Test tmp-is-dir
pysetjsonmember "tmp-is-dir" 'True'

new_treefile=composedata/fedora-misc-tweaks-includer.yaml
cat > ${new_treefile} <<EOF
include: $(basename ${treefile})
postprocess:
- |
#!/bin/bash
set -xeuo pipefail
test -f /usr/share/included-postprocess-test
EOF
export treefile=${new_treefile}


# Do the compose
runcompose
echo "ok compose"
Expand Down

0 comments on commit e771a99

Please sign in to comment.