diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 12:41:52 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-02-02 12:41:52 -0500 |
commit | e0b9e3ab07f64b9cbf575f560a25e5712208b8d7 (patch) | |
tree | 042de2b881138256a85110d1c00b81e7bd97b033 /test/librechroot-test.sh | |
parent | e3108aeb1e38e9d6b243015344c6b4d856221fb4 (diff) |
test/librechroot: test the -N flag
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r-- | test/librechroot-test.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/librechroot-test.sh b/test/librechroot-test.sh index d458cd9..ae5dd4b 100644 --- a/test/librechroot-test.sh +++ b/test/librechroot-test.sh @@ -44,6 +44,14 @@ it_respects_exit_status_if_out_isnt_a_tty() ( [[ $r == 3 ]] ) +it_disables_networking_when_requested() { + require network sudo || return 0 + libremessages msg 'Creating a chroot, may take a few minutes' &>/dev/tty + + testsudo librechroot -l "$roundup_test_name" run curl https://repo.parabolagnulinux.org/ >/dev/null + ! testsudo librechroot -l "$roundup_test_name" -N run curl https://repo.parabolagnulinux.org/ >/dev/null +} + it_displays_help_as_normal_user() { rm -rf "$XDG_CONFIG_HOME" LC_ALL=C librechroot help >$tmpdir/stdout 2>$tmpdir/stderr |