summaryrefslogtreecommitdiff
path: root/test/librechroot-test.sh
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 01:28:25 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:23:29 -0400
commit589186164cfbb1e033b9dfad33c9bf82b9404b1c (patch)
tree3919316871a4b17c35d2b74971c86b52f1ae73b0 /test/librechroot-test.sh
parent76b27c5c5a705770fbab763199dd32efc279170a (diff)
test: change how we do sudo (to make sure we stay in the test environment)
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r--test/librechroot-test.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh
index 06abd23..8545380 100644
--- a/test/librechroot-test.sh
+++ b/test/librechroot-test.sh
@@ -20,15 +20,15 @@ after() {
it_creates_repo_for_new_chroots() {
require network sudo || return 0
libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty
- sudo -EH librechroot run test -r /repo/repo.db
+ testsudo 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
+ testsudo librechroot make
+ testsudo librechroot clean-repo
+ testsudo librechroot run test -r /repo/repo.db
# TODO: inspect /repo/* more
}
@@ -59,7 +59,7 @@ it_displays_help_and_fails_with_0_args() {
# requires sudo so we know it's not failing because it needs root
it_fails_for_unknown_commands() {
require sudo || return 0
- sudo -EH librechroot phony >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+ testsudo librechroot phony >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
[[ -z "$(cat $tmpdir/stdout)" ]]
@@ -69,7 +69,7 @@ it_fails_for_unknown_commands() {
# requires sudo so we know it's not failing because it needs root
it_fails_for_unknown_flags() {
require sudo || return 0
- sudo -EH librechroot -q >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+ testsudo librechroot -q >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
[[ $stat != 0 ]]
[[ -z "$(cat $tmpdir/stdout)" ]]