2022-02-23 09:42:33 +01:00
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -226,7 +226,7 @@ cd ${test_tmpdir}
if $OSTREE commit ${COMMIT_ARGS} -b test-bootable --bootable $test_tmpdir/checkout-test2-4 2>err.txt; then
fatal "committed non-bootable tree"
fi
-assert_file_has_content err.txt "error: .*No such file or directory"
+assert_file_has_content err.txt "error:.*No such file or directory"
echo "ok commit fails bootable if no kernel"
cd ${test_tmpdir}
2019-07-31 00:47:09 +02:00
diff --git a/tests/pull-test.sh b/tests/pull-test.sh
2022-02-23 09:42:33 +01:00
index f4084290..4af5ec6f 100644
2019-07-31 00:47:09 +02:00
--- a/tests/pull-test.sh
+++ b/tests/pull-test.sh
2022-02-23 09:42:33 +01:00
@@ -297,7 +297,7 @@ ostree_repo_init mirrorrepo-local --mode=archive
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo 2>err.txt; then
fatal "pull with mixed refs succeeded?"
fi
-assert_file_has_content err.txt "error: Invalid ref name origin:main"
+assert_file_has_content err.txt "Invalid ref name origin:main"
${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo localbranch
${CMD_PREFIX} ostree --repo=mirrorrepo-local rev-parse localbranch
${CMD_PREFIX} ostree --repo=mirrorrepo-local fsck
2022-02-23 09:42:33 +01:00
@@ -308,7 +308,7 @@ if ${CMD_PREFIX} ostree --repo=mirrorrepo-local pull-local otherrepo nosuchbranc
2018-09-17 01:16:37 +02:00
fatal "pulled nonexistent branch"
fi
# So true
-assert_file_has_content_literal err.txt "error: Refspec 'nosuchbranch' not found"
+assert_file_has_content_literal err.txt "Refspec 'nosuchbranch' not found"
echo "ok pull-local nonexistent branch"
cd ${test_tmpdir}
2022-02-23 09:42:33 +01:00
@@ -687,5 +687,5 @@ rm ostree-srv/gnomerepo/summary
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.txt; then
fatal "pull of invalid ref succeeded"
fi
-assert_file_has_content_literal err.txt 'error: Fetching checksum for ref ((empty), main): Invalid rev lots of html here lots of html here lots of html here lots of'
+assert_file_has_content_literal err.txt 'Fetching checksum for ref ((empty), main): Invalid rev lots of html here lots of html here lots of html here lots of'
echo "ok pull got HTML for a ref"
2019-07-31 00:47:09 +02:00
diff --git a/tests/test-config.sh b/tests/test-config.sh
2022-02-23 09:42:33 +01:00
index 2d9aaf53..f1e28614 100755
2019-07-31 00:47:09 +02:00
--- a/tests/test-config.sh
+++ b/tests/test-config.sh
2022-02-23 09:42:33 +01:00
@@ -44,7 +44,7 @@ assert_file_has_content list.txt "http://example\.com/ostree/repo/"
2019-07-31 00:47:09 +02:00
if ${CMD_PREFIX} ostree config --repo=repo get --group=core lock-timeout-secs extra 2>err.txt; then
assert_not_reached "ostree config get should error out if too many arguments are given"
fi
-assert_file_has_content err.txt "error: Too many arguments given"
+assert_file_has_content err.txt "Too many arguments given"
echo "ok config get"
${CMD_PREFIX} ostree config --repo=repo set core.mode bare-user-only
2022-02-23 09:42:33 +01:00
@@ -61,7 +61,7 @@ assert_file_has_content repo/config "http://example\.com/ostree/"
2019-07-31 00:47:09 +02:00
if ${CMD_PREFIX} ostree config --repo=repo set --group=core lock-timeout-secs 120 extra 2>err.txt; then
assert_not_reached "ostree config set should error out if too many arguments are given"
fi
-assert_file_has_content err.txt "error: Too many arguments given"
+assert_file_has_content err.txt "Too many arguments given"
echo "ok config set"
2022-02-23 09:42:33 +01:00
# Check that using `--` works and that "ostree config unset" works
@@ -78,7 +78,7 @@ if ${CMD_PREFIX} ostree config --repo=repo get core.lock-timeout-secs 2>err.txt;
2019-07-31 00:47:09 +02:00
fi
# Check for any character where quotation marks would be as they appear differently in the Fedora and Debian
# test suites (“” and '' respectively). See: https://github.com/ostreedev/ostree/pull/1839
-assert_file_has_content err.txt "error: Key file does not have key .lock-timeout-secs. in group .core."
+assert_file_has_content err.txt "Key file does not have key .lock-timeout-secs. in group .core."
# Check that it's idempotent
${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs
2022-02-23 09:42:33 +01:00
@@ -95,5 +95,5 @@ ${CMD_PREFIX} ostree config --repo=repo unset --group='remote "aoeuhtns"' 'xa.ti
2019-07-31 00:47:09 +02:00
if ${CMD_PREFIX} ostree config --repo=repo unset core.lock-timeout-secs extra 2>err.txt; then
assert_not_reached "ostree config unset should error out if too many arguments are given"
fi
-assert_file_has_content err.txt "error: Too many arguments given"
+assert_file_has_content err.txt "Too many arguments given"
echo "ok config unset"
diff --git a/tests/test-fsck-collections.sh b/tests/test-fsck-collections.sh
2022-02-23 09:42:33 +01:00
index 3dbcdd23..d6359979 100755
2019-07-31 00:47:09 +02:00
--- a/tests/test-fsck-collections.sh
+++ b/tests/test-fsck-collections.sh
2022-02-23 09:42:33 +01:00
@@ -98,7 +98,7 @@ ${CMD_PREFIX} ostree fsck --repo=repo
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
-assert_file_has_content fsck-error "Commit has no requested ref ‘ new-ref’ in ref binding metadata (‘ ref1’ )"
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref1.)"
2019-07-31 00:47:09 +02:00
assert_file_has_content fsck "^Validating refs\.\.\.$"
2018-09-17 01:16:37 +02:00
echo "ok 3 fsck detects missing ref bindings"
2022-02-23 09:42:33 +01:00
@@ -111,7 +111,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
-assert_file_has_content fsck-error "Commit has no requested ref ‘ new-ref’ in ref binding metadata (‘ ref1’ )"
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref1.)"
2019-07-31 00:47:09 +02:00
assert_file_has_content fsck "^Validating refs\.\.\.$"
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
2018-09-17 01:16:37 +02:00
2022-02-23 09:42:33 +01:00
@@ -125,7 +125,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --collections --create=org.example.Collect
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
2019-07-31 00:47:09 +02:00
-assert_file_has_content fsck-error "Commit has collection ID ‘ org\.example\.Collection’ in collection binding metadata, while the remote it came from has collection ID ‘ org\.example\.Collection2’ "
+assert_file_has_content fsck-error "Commit has collection ID .org\.example\.Collection. in collection binding metadata, while the remote it came from has collection ID .org\.example\.Collection2."
assert_file_has_content fsck "^Validating refs\.\.\.$"
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
2018-09-17 01:16:37 +02:00
2022-02-23 09:42:33 +01:00
@@ -145,7 +145,7 @@ echo "ok 6 fsck ignores unreferenced ref bindings"
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
2019-07-31 00:47:09 +02:00
-assert_file_has_content fsck-error "Collection– ref (org\.example\.Collection, ref1) in bindings for commit .* does not exist"
+assert_file_has_content fsck-error 'Collection.ref (org\.example\.Collection, ref1) in bindings for commit .* does not exist'
assert_file_has_content fsck "^Validating refs\.\.\.$"
assert_file_has_content fsck "^Validating refs in collections\.\.\.$"
2018-09-17 01:16:37 +02:00
2022-02-23 09:42:33 +01:00
@@ -184,7 +184,7 @@ ${CMD_PREFIX} ostree --repo=repo refs --create=new-ref $(cat ref3-checksum)
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-bindings > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
-assert_file_has_content fsck-error "Commit has no requested ref ‘ new-ref’ in ref binding metadata (‘ ref3’ , ‘ ref4’ )"
+assert_file_has_content fsck-error "Commit has no requested ref .new-ref. in ref binding metadata (.ref3., .ref4.)"
2019-07-31 00:47:09 +02:00
assert_file_has_content fsck "^Validating refs\.\.\.$"
2018-09-17 01:16:37 +02:00
echo "ok 9 fsck detects missing ref bindings"
2022-02-23 09:42:33 +01:00
@@ -203,7 +203,7 @@ echo "ok 10 fsck ignores unreferenced ref bindings"
2018-09-17 01:16:37 +02:00
if ${CMD_PREFIX} ostree fsck --repo=repo --verify-back-refs > fsck 2> fsck-error; then
assert_not_reached "fsck unexpectedly succeeded after adding unbound ref!"
fi
-assert_file_has_content fsck-error "Ref ‘ ref3’ in bindings for commit .* does not exist"
+assert_file_has_content fsck-error 'Ref .ref3. in bindings for commit .* does not exist'
2019-07-31 00:47:09 +02:00
assert_file_has_content fsck "^Validating refs\.\.\.$"
2018-09-17 01:16:37 +02:00
echo "ok 11 fsck ignores unreferenced ref bindings"
2019-07-31 00:47:09 +02:00
diff --git a/tests/test-remote-add.sh b/tests/test-remote-add.sh
2022-02-23 09:42:33 +01:00
index 2f5ea634..0f63853c 100755
2019-07-31 00:47:09 +02:00
--- a/tests/test-remote-add.sh
+++ b/tests/test-remote-add.sh
2022-02-23 09:42:33 +01:00
@@ -81,7 +81,7 @@ echo "ok remote delete"
2018-09-17 01:16:37 +02:00
if $OSTREE remote delete nosuchremote 2>err.txt; then
assert_not_reached "Deleting remote unexpectedly succeeded"
fi
-assert_file_has_content err.txt "error: "
+assert_file_has_content err.txt "not found"
$OSTREE remote delete --if-exists nosuchremote
echo "ok"