diff options
author | Colin Walters <walters@verbum.org> | 2013-09-09 17:01:32 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-09-09 17:01:32 -0400 |
commit | ac2d61dd515e547df6e1fc9e9d438783a201848d (patch) | |
tree | a6b6302ae4e2a2875d9361808be539bb61d1a7c3 /tests/test-basic.sh | |
parent | b4b700c1635df1a0b02d809d0f17c153fbd826a1 (diff) | |
download | ostree-ac2d61dd515e547df6e1fc9e9d438783a201848d.tar.gz |
core: Add detached metadata, readd metadata to commits
Previously I thought we'd have to ditch the current commit
format to avoid a{sv} due to
See https://bugzilla.gnome.org/show_bug.cgi?id=673012
But I realized that we don't really have to care about
unpacking/repacking commit objects, so let's just re-expose the
existing metadata a{sv} in commits in the API.
Also, add support for "detached" metadata that can be updated at any
time post-commit. This is specifically designed for GPG signatures.
https://bugzilla.gnome.org/show_bug.cgi?id=707379
Diffstat (limited to 'tests/test-basic.sh')
-rwxr-xr-x | tests/test-basic.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/test-basic.sh b/tests/test-basic.sh index 0c17fc5b..d5b9e5a4 100755 --- a/tests/test-basic.sh +++ b/tests/test-basic.sh @@ -19,7 +19,7 @@ set -e -echo "1..40" +echo "1..41" . $(dirname $0)/libtest.sh @@ -282,3 +282,12 @@ $OSTREE checkout test2 checkout-test2 touch checkout-test2/sometestfile $OSTREE commit -s sometest -b test2 checkout-test2 echo "ok commit with directory filename" + +$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 +$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 +assert_file_has_content test2-meta "CUTE" +$OSTREE show --print-detached-metadata-key=SIGNATURE test2 > test2-meta +assert_file_has_content test2-meta "HANCOCK" +echo "ok metadata commit with strings" |