summaryrefslogtreecommitdiff
path: root/tests/test-basic-user-only.sh
diff options
context:
space:
mode:
authorLuca BRUNO <luca.bruno@coreos.com>2021-08-20 10:58:24 +0000
committerLuca BRUNO <luca.bruno@coreos.com>2021-08-20 16:11:04 +0000
commit8a5241dd6a6bc4d30195c9d461f50248b0230fc5 (patch)
tree797cc3ee699bf9a9c585e6eba497f1a626df63fc /tests/test-basic-user-only.sh
parent3209acbdbe9d4e0ea45c1ed711655c9ddb55a8b3 (diff)
downloadostree-8a5241dd6a6bc4d30195c9d461f50248b0230fc5.tar.gz
lib/commit: autofix permissions for bare-user-only
This tweaks commit logic to detect bare-user-only repositories and canonicalize permissions automatically.
Diffstat (limited to 'tests/test-basic-user-only.sh')
-rwxr-xr-xtests/test-basic-user-only.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/test-basic-user-only.sh b/tests/test-basic-user-only.sh
index 02129b28..7ef153c3 100755
--- a/tests/test-basic-user-only.sh
+++ b/tests/test-basic-user-only.sh
@@ -25,7 +25,7 @@ set -euo pipefail
mode="bare-user-only"
setup_test_repository "$mode"
-extra_basic_tests=6
+extra_basic_tests=7
. $(dirname $0)/basic-test.sh
$CMD_PREFIX ostree --version > version.yaml
@@ -112,3 +112,15 @@ $OSTREE checkout --force-copy perms out
$OSTREE checkout ${CHECKOUT_H_ARGS} --union-identical perms out
$OSTREE fsck
echo "ok checkout checksum with canonical perms"
+
+cd ${test_tmpdir}
+rm repo -rf
+ostree_repo_init repo init --mode=bare-user-only
+rm files -rf && mkdir files
+echo afile > files/afile
+$OSTREE commit ${COMMIT_ARGS} -b perms files
+rm out -rf
+$OSTREE checkout --force-copy perms out
+$OSTREE checkout ${CHECKOUT_H_ARGS} --union-identical perms out
+$OSTREE fsck
+echo "ok automatic canonical perms for bare-user-only"