From e0b9e3ab07f64b9cbf575f560a25e5712208b8d7 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 12:41:52 -0500 Subject: test/librechroot: test the -N flag --- test/librechroot-test.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') 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 -- cgit v1.2.2