summaryrefslogtreecommitdiff
path: root/tests
diff options
authorjrwren@xmtp.net <>2015-11-17 16:45:47 -0500
committerjrwren@xmtp.net <>2015-11-17 16:45:47 -0500
commit47567c1b81ca04df485d92ae1b1453c9bf6b8239 (patch)
treecb86f8b4eea2c9f9628bcfd6c7078b54b69d5145 /tests
parentcfeab9952a4413f718a34bad4ae769bb098f925f (diff)
some ipv6 support
Diffstat (limited to 'tests')
-rwxr-xr-xtests/01_deploy_single.py5
-rwxr-xr-xtests/02_deploy_shard_test.py8
-rwxr-xr-xtests/03_deploy_replicaset.py3
3 files changed, 11 insertions, 5 deletions
diff --git a/tests/01_deploy_single.py b/tests/01_deploy_single.py
index f5c11f5..95b48a4 100755
--- a/tests/01_deploy_single.py
+++ b/tests/01_deploy_single.py
@@ -24,7 +24,10 @@ except:
# Validate connectivity from $WORLD
#############################################################
def validate_world_connectivity():
- client = MongoClient(d.sentry['mongodb'][0].info['public-address'])
+ addy = d.sentry['mongodb'][0].info['public-address'])
+ if ":" in addy:
+ addy =- "[{}]".format(addy)
+ client = MongoClient(addy)
db = client['test']
# Can we successfully insert?
diff --git a/tests/02_deploy_shard_test.py b/tests/02_deploy_shard_test.py
index cdb9d07..5d311b4 100755
--- a/tests/02_deploy_shard_test.py
+++ b/tests/02_deploy_shard_test.py
@@ -60,9 +60,11 @@ sentry_dict = {
# Check presence of MongoDB GUI HEALTH Status
#############################################################
def validate_status_interface():
- r = requests.get("http://{}:28017".format(
- sentry_dict['config-sentry'].info['public-address']),
- verify=False)
+ pubaddy = sentry_dict['config-sentry'].info['public-address']
+ fmt = "http://{}:28017"
+ if ":" in pubaddy:
+ fmt = "http://[{}]:28017"
+ r = requests.get(fmt.format(pubaddy), verify=False)
r.raise_for_status
diff --git a/tests/03_deploy_replicaset.py b/tests/03_deploy_replicaset.py
index e0d10a1..865b653 100755
--- a/tests/03_deploy_replicaset.py
+++ b/tests/03_deploy_replicaset.py
@@ -95,7 +95,8 @@ def validate_replicaset_setup():
# Validate connectivity from $WORLD
#############################################################
def validate_world_connectivity():
- client = MongoClient(d.sentry['mongodb'][0].info['public-address'])
+ print(d.sentry['mongodb'])
+ client = MongoClient(d.sentry['mongodb'][1].info['public-address'])
db = client['test']
# Can we successfully insert?