diff options
author | elijah <elijah@riseup.net> | 2014-05-13 02:14:37 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-05-13 02:14:37 -0700 |
commit | a3f923e66b05ffc12037b239995f463f81ea229d (patch) | |
tree | 6b7fee1a8f8f9680508d77030896659c46c9c3e9 | |
parent | 071547967cc00acf18bf68b78e350131017852b9 (diff) |
added simple shorewall whitebox test (close #5649)
-rwxr-xr-x | bin/run_tests | 10 | ||||
-rw-r--r-- | tests/white-box/network.rb | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/bin/run_tests b/bin/run_tests index 9102c325..526aa83a 100755 --- a/bin/run_tests +++ b/bin/run_tests @@ -288,6 +288,16 @@ def assert_running(process) end # +# runs the specified command, failing on a non-zero exit status. +# +def assert_run(command) + output = `#{command}` + if $?.exitstatus != 0 + fail "Error running `#{command}`:\n#{output}" + end +end + +# # Custom test runner in order to modify the output. # class LeapRunner < MiniTest::Unit diff --git a/tests/white-box/network.rb b/tests/white-box/network.rb index 955857dc..e0b0339d 100644 --- a/tests/white-box/network.rb +++ b/tests/white-box/network.rb @@ -57,4 +57,9 @@ class Network < LeapTest end end + def test_03_Is_shorewall_running? + assert_run('/sbin/shorewall status') + pass + end + end |