PSA: Written a test for charms? Please read
Marco Ceppi
marco.ceppi at canonical.com
Mon Nov 30 16:56:00 UTC 2015
Hello everyone,
This issue has popped up a few times in the community now and I'd like to
make it clear for those creating charms and writing tests with Amulet how
to access the data for each unit deployed in the test.
Given the following example:
d = amulet.deployment()
d.add('service')
d.setup()
If you're using the following syntax to access units in your test:
d.sentry.unit['service/0']
You will need to update this to instead be
d.sentry.unit['service'][0]
or simply
d.sentry['service'][0]
With changes in both Juju 1.25 and the Charm Testing CI if you make use of
the previous means, a hard-coded entry of the unit name, your tests will
likely start failing if they haven't already.
We will be working to address this in Amulet and triage documentation and
popular examples of charms to make sure we're providing the best example of
this.
Thanks!
Marco Ceppi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20151130/26137f95/attachment.html>
More information about the Juju
mailing list