tests/compose: Fix unified rev-parse test
We were hitting the classic "negative test passes for the wrong reason". It was failing not because it didn't have a parent, but because we didn't pass `--repo`. Fix this and also explicitly check for the error message we expect. Closes: #1865 Approved by: cgwalters
This commit is contained in:
parent
fc49fb0089
commit
ebb03ee730
@ -72,7 +72,8 @@ assert_not_streq "${origrev}" "${newrev}"
|
||||
echo "ok rerun"
|
||||
|
||||
# And check that --no-parent worked.
|
||||
if ostree rev-parse ${newrev}^; then
|
||||
if ostree rev-parse --repo "${repobuild}" ${newrev}^ 2>error.txt; then
|
||||
assert_not_reached "New revision has a parent even with --no-parent?"
|
||||
fi
|
||||
assert_file_has_content_literal error.txt 'has no parent'
|
||||
echo "ok --no-parent"
|
||||
|
Loading…
Reference in New Issue
Block a user