Skip to content

Commit

Permalink
fixup! repo: Add a "force copy" flag to checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Apr 21, 2017
1 parent 3a794ea commit 8c0d97d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/basic-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ echo "ok yaml version"
CHECKOUT_U_ARG=""
COMMIT_ARGS=""
DIFF_ARGS=""
if grep bare-user-only repo/config; then
if grep -q bare-user-only repo/config; then
# In bare-user-only repos we can only represent files with uid/gid 0, no
# xattrs and canonical permissions, so we need to commit them as such, or
# we end up with repos that don't pass fsck
Expand All @@ -41,7 +41,6 @@ fi
validate_checkout_basic() {
(cd $1;
assert_has_file firstfile
assert_not_streq $(stat -c '%h' firstfile) 1
assert_has_file baz/cow
assert_file_has_content baz/cow moo
assert_has_file baz/deeper/ohyeah
Expand All @@ -51,11 +50,14 @@ validate_checkout_basic() {

$OSTREE checkout test2 checkout-test2
validate_checkout_basic checkout-test2
if grep -q 'mode=bare$' repo/config; then
assert_not_streq $(stat -c '%h' checkout-test2/firstfile) 1
fi
echo "ok checkout"

# Note this tests bare-user *and* bare-user-only
rm checkout-test2 -rf
if grep bare-user repo/config; then
if grep -q bare-user repo/config; then
$OSTREE checkout -U -H test2 checkout-test2
else
$OSTREE checkout -H test2 checkout-test2
Expand Down

0 comments on commit 8c0d97d

Please sign in to comment.