tests/compose: Add a test for --write-commitid-to
This is used in critical paths like pungi, so let's be sure it works; the semantics are a bit subtle as it overrides setting the ref. Closes: #1161 Approved by: jlebon
This commit is contained in:
parent
b7fa00e4a6
commit
2e3ff041c7
18
tests/compose-tests/test-write-commitid.sh
Executable file
18
tests/compose-tests/test-write-commitid.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xeuo pipefail
|
||||
|
||||
dn=$(cd $(dirname $0) && pwd)
|
||||
. ${dn}/libcomposetest.sh
|
||||
|
||||
prepare_compose_test "write-commitid"
|
||||
runcompose --write-commitid-to $(pwd)/commitid.txt
|
||||
wc -c < commitid.txt > wc.txt
|
||||
assert_file_has_content_literal wc.txt 64
|
||||
echo "ok compose"
|
||||
|
||||
# --write-commitid-to should not set the ref
|
||||
if ostree --repo=${repobuild} rev-parse ${treeref}; then
|
||||
fatal "Found ${treeref} ?"
|
||||
fi
|
||||
echo "ok ref not written"
|
Loading…
Reference in New Issue
Block a user