summaryrefslogtreecommitdiff
path: root/tests
diff options
authorjrwren@xmtp.net <>2015-12-07 17:34:11 -0500
committerjrwren@xmtp.net <>2015-12-07 17:34:11 -0500
commit860496806328ac8ddddea0402b90a1af17c57284 (patch)
tree7a6ddd74b5eb96a789acec2eaaeae301fdb4abe2 /tests
parentd261ea05d2d7502335e60c2f119a6a6569316a05 (diff)
use constraints for storage test to prevent filling root volume
Diffstat (limited to 'tests')
-rwxr-xr-xtests/04_deploy_with_storage.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/04_deploy_with_storage.py b/tests/04_deploy_with_storage.py
index c5b8da4..46aef57 100755
--- a/tests/04_deploy_with_storage.py
+++ b/tests/04_deploy_with_storage.py
@@ -15,14 +15,15 @@ seconds = 1800
# status
wait_for_replicaset = 60*5
# amount of time to wait for the data relation
-wait_for_relation = 60*2
+wait_for_relation = 60*5
#########################################################
# 3shard cluster configuration
#########################################################
d = amulet.Deployment(series='trusty')
-d.add('mongodb', units=scale, series='trusty')
+d.add('mongodb', units=scale, series='trusty',
+ constraints={'root-disk': '20480M'})
d.add('storage', charm='cs:~chris-gondolin/trusty/storage-5', series='trusty')
d.configure('storage', {'provider': 'local'})
@@ -31,7 +32,7 @@ d.expose('mongodb')
# Perform the setup for the deployment.
try:
d.setup(seconds)
- d.sentry.wait(seconds)
+ d.sentry.wait(wait_for_replicaset)
except amulet.helpers.TimeoutError:
message = 'The environment did not setup in %d seconds.', seconds
amulet.raise_status(amulet.SKIP, msg=message)
@@ -57,7 +58,7 @@ def validate_status():
#############################################################
def validate_replicaset_setup():
- d.sentry.wait()
+ d.sentry.wait(seconds)
unit_status = []
@@ -88,6 +89,6 @@ try:
d.relate('mongodb:data', 'storage:data')
except OSError as e:
print("ignoring error:{}", e)
-d.sentry.wait()
+d.sentry.wait(wait_for_relation)
validate_status()
validate_replicaset_setup()