summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2015-07-21 15:41:39 +0200
committerColin Walters <walters@verbum.org>2015-07-21 10:02:30 -0400
commita917c96976147595ff39c7524678331776ad3127 (patch)
tree940803216a3bfa0a8fd821058407cf6d355304bc
parentdf0cae437556e0e2c7e6b0c10e9750520d0c34f2 (diff)
downloadostree-a917c96976147595ff39c7524678331776ad3127.tar.gz
tests: do not commit from the working directory
It fixes this problem: ``` error: Not a regular file or symlink: S.gpg-agent ``` Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rwxr-xr-xtests/basic-test.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/basic-test.sh b/tests/basic-test.sh
index 927764f6..e8f1e9d2 100755
--- a/tests/basic-test.sh
+++ b/tests/basic-test.sh
@@ -276,16 +276,18 @@ cd ${test_tmpdir}
$OSTREE show test2
echo "ok show with non-checksum"
-cd ${test_tmpdir}
+cd $test_tmpdir/checkout-test2
checksum=$($OSTREE commit -b test4 -s "Third commit")
+cd ${test_tmpdir}
$OSTREE show test4 > show-output
assert_file_has_content show-output "Third commit"
assert_file_has_content show-output "commit $checksum"
echo "ok show full output"
-cd ${test_tmpdir}
+cd $test_tmpdir/checkout-test2
checksum1=$($OSTREE commit -b test5 -s "First commit")
checksum2=$($OSTREE commit -b test5 -s "Second commit")
+cd ${test_tmpdir}
$OSTREE log test5 > log-output
assert_file_has_content log-output "First commit"
assert_file_has_content log-output "commit $checksum1"
@@ -293,9 +295,10 @@ assert_file_has_content log-output "Second commit"
assert_file_has_content log-output "commit $checksum2"
echo "ok log output"
-cd ${test_tmpdir}
+cd $test_tmpdir/checkout-test2
checksum1=$($OSTREE commit -b test6 -s "First commit")
checksum2=$($OSTREE commit -b test6 -s "Second commit")
+cd ${test_tmpdir}
$OSTREE show test6 > show-output
assert_file_has_content show-output "commit $checksum2"
$OSTREE reset test6 $checksum1
@@ -310,7 +313,9 @@ touch checkout-test2/sometestfile
$OSTREE commit -s sometest -b test2 checkout-test2
echo "ok commit with directory filename"
+cd $test_tmpdir/checkout-test2
$OSTREE commit -b test2 -s "Metadata string" --add-metadata-string=FOO=BAR --add-metadata-string=KITTENS=CUTE --add-detached-metadata-string=SIGNATURE=HANCOCK --tree=ref=test2
+cd ${test_tmpdir}
$OSTREE show --print-metadata-key=FOO test2 > test2-meta
assert_file_has_content test2-meta "BAR"
$OSTREE show --print-metadata-key=KITTENS test2 > test2-meta