PSA: Written a test for charms? Please read

Jay Wren jay.wren at canonical.com
Mon Nov 30 17:06:34 UTC 2015


It may be worth mentioning that even if you didn't create the charm or
write the amulet tests this may effect you. If you are trying to
update a charm, even with an entirely unrelated feature, your proposed
changes will not be accepted until tests pass.

It is up to us as the unrelated feature authors, to contribute to this
syntax migration.
--
Jay

On Mon, Nov 30, 2015 at 11:56 AM, Marco Ceppi <marco.ceppi at canonical.com> wrote:
> 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
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>



More information about the Juju mailing list