~deej/mojo/telegraf-charm-testing

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Collect, pre-deploy (lint, etc.) deploy and check the initial charm
# We need to clean the build directory first in case the type of charm
# we're deploying is different from the upstream (e.g. git vs. charmstore)
script config=clean-build-dir
# Now get all other charms for this test
collect config=collect
# Now get the specific individual charm based on what's specified at run time
stop-on return-code=99 config=check-initial-charm INITIAL_CHARM=${INITIAL_CHARM}
script config=create-initial-collect INITIAL_CHARM=${INITIAL_CHARM}
collect config=collect-initial
script config=pre-deploy
deploy config=deploy wait=true
nagios-check retry=3 sleep=60
verify config=post-deploy retry=3 sleep=60
# Now test an upgrade to the new charm if UPGRADE_CHARM is set
stop-on return-code=99 config=check-upgrade-charm UPGRADE_CHARM=${UPGRADE_CHARM}
script config=create-upgrade-collect UPGRADE_CHARM=${UPGRADE_CHARM}
collect config=collect-upgrade
script config=upgrade-charm
juju-check-wait
nagios-check retry=3 sleep=60
verify config=post-deploy retry=3 sleep=60
# Now redeploy the model, and test a deployment from scratch (with the updated charm in place)
script config=redeploy-model
script config=pre-deploy
deploy config=deploy wait=true
nagios-check retry=3 sleep=60
verify config=post-deploy retry=3 sleep=60