summaryrefslogtreecommitdiff
path: root/tests/white-box/network.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-12-27 02:43:24 -0800
committerelijah <elijah@riseup.net>2013-12-27 02:43:24 -0800
commit34678e895a5a40da6f444199983fee3f8ce518ee (patch)
treebe92fdc1efa49ea177fcaf7632166087ac61f762 /tests/white-box/network.rb
parentbf385beb22b7a17899604c21b764d84de55b23a8 (diff)
added some network tests for stunnel
Diffstat (limited to 'tests/white-box/network.rb')
-rw-r--r--tests/white-box/network.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/tests/white-box/network.rb b/tests/white-box/network.rb
index 9680cb5f..8ca56ffd 100644
--- a/tests/white-box/network.rb
+++ b/tests/white-box/network.rb
@@ -1,12 +1,31 @@
+require 'socket'
+
+raise SkipTest if $node["dummy"]
+
class TestNetwork < LeapTest
def setup
end
#
- # TODO: write an actual test to confirm the network is up and working.
+ # example properties:
+ #
+ # stunnel:
+ # couch_client:
+ # couch1_5984:
+ # accept_port: 4000
+ # connect: couch1.bitmask.i
+ # connect_port: 15984
#
- def test_working
+ def test_01_stunnel_is_running
+ if $node['stunnel']
+ $node['stunnel'].values.each do |stunnel_type|
+ stunnel_type.values.each do |stunnel_conf|
+ assert port = stunnel_conf['accept_port'], 'Field `accept_port` must be present in `stunnel` property.'
+ assert_tcp_socket('localhost', port)
+ end
+ end
+ end
pass
end