summaryrefslogtreecommitdiff
path: root/test/librechroot-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/librechroot-test.sh')
-rw-r--r--test/librechroot-test.sh8
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