diff options
author | Jonathan Lebon <jlebon@redhat.com> | 2016-04-22 12:35:48 -0400 |
---|---|---|
committer | Colin Walters (automation) <walters+githubbot@verbum.org> | 2016-05-06 14:44:55 +0000 |
commit | b717fd2c18ef71002826012a876b7457ef8fd802 (patch) | |
tree | eca7b5a0dd58079e8843379e2e54729f6d21ad6f /tests | |
parent | b1d3dd151ce7280a4992cb0033a58623876a0563 (diff) | |
download | ostree-b717fd2c18ef71002826012a876b7457ef8fd802.tar.gz |
ot-builtin-commit.c: add --skip-list option
This was already supported by the commit modifier API, just needed to
expose it. This will also be used to test the libarchive API in a future
test.
Closes: #275
Approved by: cgwalters
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/basic-test.sh | 26 | ||||
-rwxr-xr-x | tests/test-setuid.sh | 40 |
2 files changed, 22 insertions, 44 deletions
diff --git a/tests/basic-test.sh b/tests/basic-test.sh index b2477955..a44ee630 100755 --- a/tests/basic-test.sh +++ b/tests/basic-test.sh @@ -19,7 +19,7 @@ set -euo pipefail -echo "1..54" +echo "1..55" $OSTREE checkout test2 checkout-test2 echo "ok checkout" @@ -179,13 +179,31 @@ cd ${test_tmpdir}/checkout-test2-4 $OSTREE commit -b test2 -s "no xattrs" --no-xattrs echo "ok commit with no xattrs" +# NB: The + is optional, but we need to make sure we support it cd ${test_tmpdir} cat > test-statoverride.txt <<EOF -+2048 /a/nested/3 ++1048 /a/nested/2 +2048 /a/nested/3 EOF cd ${test_tmpdir}/checkout-test2-4 -$OSTREE commit -b test2 -s "with statoverride" --statoverride=../test-statoverride.txt -echo "ok commit statoverridde" +$OSTREE commit -b test2-override -s "with statoverride" --statoverride=../test-statoverride.txt +cd ${test_tmpdir} +$OSTREE checkout test2-override checkout-test2-override +test -g checkout-test2-override/a/nested/2 +test -u checkout-test2-override/a/nested/3 +echo "ok commit statoverride" + +cd ${test_tmpdir} +cat > test-skiplist.txt <<EOF +/a/nested/3 +EOF +cd ${test_tmpdir}/checkout-test2-4 +assert_has_file a/nested/3 +$OSTREE commit -b test2-skiplist -s "with skiplist" --skip-list=../test-skiplist.txt +cd ${test_tmpdir} +$OSTREE checkout test2-skiplist checkout-test2-skiplist +assert_not_has_file checkout-test2-skiplist/a/nested/3 +echo "ok commit skiplist" cd ${test_tmpdir} $OSTREE prune diff --git a/tests/test-setuid.sh b/tests/test-setuid.sh deleted file mode 100755 index edf707df..00000000 --- a/tests/test-setuid.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2013 Colin Walters <walters@verbum.org> -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -set -euo pipefail - -echo "1..1" - -. $(dirname $0)/libtest.sh - -setup_test_repository "bare" - -cd ${test_tmpdir} -cat > test-statoverride.txt <<EOF -+2048 /abinary -EOF -$OSTREE checkout test2 test2-checkout -touch test2-checkout/abinary -chmod a+x test2-checkout/abinary -(cd test2-checkout && $OSTREE commit -b test2 -s "with statoverride" --statoverride=../test-statoverride.txt) -rm -rf test2-checkout -$OSTREE checkout test2 test2-checkout -test -u test2-checkout/abinary - -echo "ok" |