summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 21:46:31 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-05 21:46:31 -0600
commiteddd0fe20c0ac9645874cca70349ccfe1967e627 (patch)
tree3efd3942feada93c9a41c4486f8a70aec3cedc65 /test
parentadc6865b29b31a32cce195d6912af039ef7eab77 (diff)
librechroot: fix clean-repov20130605.1
Diffstat (limited to 'test')
-rw-r--r--test/librechroot-test.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index 9dc1b7d..06abd23 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -7,7 +7,7 @@ describe librechroot
before() {
_before librechroot
mkdir -p "$XDG_CONFIG_HOME"/libretools
- echo "CHROOTDIR='$tmpdir'" > "$XDG_CONFIG_HOME"/libretools/chroot.conf
+ echo "CHROOTDIR='$tmpdir/chrootdir'" > "$XDG_CONFIG_HOME"/libretools/chroot.conf
echo "CHROOT='default'" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
echo "CHROOTEXTRAPKG=()" >> "$XDG_CONFIG_HOME"/libretools/chroot.conf
}
@@ -23,6 +23,15 @@ it_creates_repo_for_new_chroots() {
sudo -EH librechroot run test -r /repo/repo.db
}
+it_cleans_the_local_repo_correctly() {
+ require network sudo || return 0
+ libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
+ sudo -EH librechroot make
+ sudo -EH librechroot clean-repo
+ sudo -EH librechroot run test -r /repo/repo.db
+ # TODO: inspect /repo/* more
+}
+
it_displays_help_as_normal_user() {
rm -rf "$XDG_CONFIG_HOME"
librechroot help >$tmpdir/stdout 2>$tmpdir/stderr