6
d = amulet.Deployment()
14
except amulet.helpers.TimeoutError:
15
amulet.raise_status(amulet.SKIP, msg="Environment wasn't stood up in time")
19
unit = d.sentry.unit['gpfs/0']
21
# test we can access over http
22
page = requests.get('http://{}'.format(unit.info['public-address']))
23
page.raise_for_status()
26
# Now you can use d.sentry.unit[UNIT] to address each of the units and perform
27
# more in-depth steps. There are three test statuses: amulet.PASS, amulet.FAIL,
28
# and amulet.SKIP - these can be triggered with amulet.raise_status(). Each
29
# d.sentry.unit[] has the following methods:
30
# - .info - An array of the information of that unit from Juju
31
# - .file(PATH) - Get the details of a file on that unit
32
# - .file_contents(PATH) - Get plain text output of PATH file from that unit
33
# - .directory(PATH) - Get details of directory
34
# - .directory_contents(PATH) - List files and folders in PATH on that unit
35
# - .relation(relation, service:rel) - Get relation data from return service