diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/01_deploy_single.py | 2 | ||||
| -rwxr-xr-x | tests/02_deploy_shard_test.py | 4 | ||||
| -rwxr-xr-x | tests/03_deploy_replicaset.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/01_deploy_single.py b/tests/01_deploy_single.py index 885ee26..c5e91f2 100755 --- a/tests/01_deploy_single.py +++ b/tests/01_deploy_single.py @@ -36,7 +36,7 @@ def validate_world_connectivity(): amulet.raise_status(amulet.FAIL, msg="Failed to insert test data") # Can we delete from a shard using the Mongos hub? result = db.amulet.remove(insert_id) - if result['err'] is not None: + if 'err' in result and result['err'] is not None: amulet.raise_status(amulet.FAIL, msg="Failed to remove test data") diff --git a/tests/02_deploy_shard_test.py b/tests/02_deploy_shard_test.py index 2ff0750..6343785 100755 --- a/tests/02_deploy_shard_test.py +++ b/tests/02_deploy_shard_test.py @@ -92,7 +92,7 @@ def validate_status_interface(): def validate_running_services(): for service in sentry_dict: output = sentry_dict[service].run('service mongodb status') - service_active = str(output).find('mongodb start/running') + service_active = str(output).find('active (running)') if service_active == -1: message = "Failed to find running MongoDB on host {}".format( service) @@ -115,7 +115,7 @@ def validate_world_connectivity(): amulet.raise_status(amulet.FAIL, msg="Failed to insert test data") # Can we delete from a shard using the Mongos hub? result = db.amulet.remove(insert_id) - if result['err'] is not None: + if 'err' in result and result['err'] is not None: amulet.raise_status(amulet.FAIL, msg="Failed to remove test data") diff --git a/tests/03_deploy_replicaset.py b/tests/03_deploy_replicaset.py index 02d25f5..cae5930 100755 --- a/tests/03_deploy_replicaset.py +++ b/tests/03_deploy_replicaset.py @@ -63,7 +63,7 @@ def validate_status_interface(): def validate_running_services(): for service in sentry_dict: output = sentry_dict[service].run('service mongodb status') - service_active = str(output).find('mongodb start/running') + service_active = str(output).find('active (running)') if service_active == -1: message = "Failed to find running MongoDB on host {}".format( service) @@ -158,7 +158,7 @@ def validate_world_connectivity(): amulet.raise_status(amulet.FAIL, msg="Failed to insert test data") # Can we delete from a shard using the Mongos hub? result = db.amulet.remove(insert_id) - if result['err'] is not None: + if 'err' in result and result['err'] is not None: amulet.raise_status(amulet.FAIL, msg="Failed to remove test data") |
