tests/libtest.sh: always nuke repo and files
authorJonathan Lebon <jlebon@redhat.com>
Thu, 28 Sep 2017 18:56:17 +0000 (18:56 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sat, 30 Sep 2017 00:05:07 +0000 (00:05 +0000)
This allows users to easily re-initialize the test repo.

Closes: #1170
Approved by: cgwalters

tests/libtest.sh

index 7ebe4449ceb3c1f3e40660230266ab4ddebdeca8..6993629d6d0bc13a33e7a0c2841151ccc3b412b1 100755 (executable)
@@ -141,6 +141,7 @@ setup_test_repository () {
     fi
 
     cd ${test_tmpdir}
+    rm -rf repo
     if test -n "${mode}"; then
         ostree_repo_init repo --mode=${mode}
     else
@@ -152,6 +153,7 @@ setup_test_repository () {
     cd ${test_tmpdir}
     local oldumask="$(umask)"
     umask 022
+    rm -rf files
     mkdir files
     cd files
     ot_files=`pwd`