diff options
author | elijah <elijah@riseup.net> | 2013-12-27 02:43:24 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-12-27 02:43:24 -0800 |
commit | 34678e895a5a40da6f444199983fee3f8ce518ee (patch) | |
tree | be92fdc1efa49ea177fcaf7632166087ac61f762 /tests/white-box/network.rb | |
parent | bf385beb22b7a17899604c21b764d84de55b23a8 (diff) |
added some network tests for stunnel
Diffstat (limited to 'tests/white-box/network.rb')
-rw-r--r-- | tests/white-box/network.rb | 23 |
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 |