summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/run_tests10
-rw-r--r--tests/white-box/network.rb5
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