[ostree] tests: Add a test for an empty /etc directory gaining content
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] tests: Add a test for an empty /etc directory gaining content
- Date: Fri, 20 Jun 2014 17:43:25 +0000 (UTC)
commit b2329cf87536482c03c1babbc183c098bd8a53ba
Author: Colin Walters <walters verbum org>
Date: Thu Jun 19 15:53:20 2014 -0400
tests: Add a test for an empty /etc directory gaining content
https://bugzilla.gnome.org/show_bug.cgi?id=731924
tests/test-admin-deploy-etcmerge-cornercases.sh | 27 ++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-admin-deploy-etcmerge-cornercases.sh b/tests/test-admin-deploy-etcmerge-cornercases.sh
index 033e559..09386aa 100644
--- a/tests/test-admin-deploy-etcmerge-cornercases.sh
+++ b/tests/test-admin-deploy-etcmerge-cornercases.sh
@@ -27,7 +27,7 @@ setup_os_repository "archive-z2" "syslinux"
echo "ok setup"
-echo "1..1"
+echo "1..2"
ostree --repo=sysroot/ostree/repo pull-local --remote=testos testos-repo testos/buildmaster/x86_64-runtime
rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
@@ -71,3 +71,28 @@ assert_file_has_mode ${newetc}/a/long/dir/forking 700
assert_file_has_mode ${newetc}/a/long/dir 777
echo "ok"
+
+# Add /etc/initially-empty
+cd "${test_tmpdir}/osdata"
+mkdir -p usr/etc/initially-empty
+ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
+cd ${test_tmpdir}
+
+# Upgrade, check that we have it
+ostree admin --sysroot=sysroot upgrade --os=testos
+rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+assert_has_dir sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty
+
+# Now add a two files in initially-empty
+cd "${test_tmpdir}/osdata"
+touch usr/etc/initially-empty/{afile,bfile}
+ostree --repo=${test_tmpdir}/testos-repo commit -b testos/buildmaster/x86_64-runtime -s "Add empty directory"
+
+# Upgrade, check that we have the two new files
+cd ${test_tmpdir}
+ostree admin --sysroot=sysroot upgrade --os=testos
+rev=$(ostree --repo=sysroot/ostree/repo rev-parse testos/buildmaster/x86_64-runtime)
+assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/afile
+assert_has_file sysroot/ostree/deploy/testos/deploy/$rev.0/etc/initially-empty/bfile
+
+echo "ok"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]