summaryrefslogtreecommitdiff
path: root/tests/white-box/network.rb
diff options
context:
space:
mode:
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