livepatch-charmers team mailing list archive
-
livepatch-charmers team
-
Mailing list archive
-
Message #00258
Re: [Merge] ~barryprice/canonical-livepatch-charm/+git/multiseries-testing:master into canonical-livepatch-charm:master
Review: Approve
This all looks good.
Diff comments:
> diff --git a/tests/99-autogen b/tests/multiseries
> similarity index 82%
> rename from tests/99-autogen
> rename to tests/multiseries
> index d7bed72..55adc62 100755
> --- a/tests/99-autogen
> +++ b/tests/multiseries
> @@ -7,38 +7,40 @@ from yaml import safe_load
>
>
> class TestDeployment(unittest.TestCase):
> + series = 'bionic' # latest LTS
> +
> @classmethod
> def setUpClass(cls):
> - cls.deployment = amulet.Deployment(series='bionic')
> + cls.deployment = amulet.Deployment(series=cls.series)
>
> # deploy mongodb as our parent
> - cls.deployment.add('mongodb')
> + cls.deployment.add('mongodb-{}'.format(cls.series), 'mongodb')
>
> # deploy our own charm
> - cls.deployment.add('canonical-livepatch')
> + cls.deployment.add('livepatch-{}'.format(cls.series), 'canonical-livepatch')
>
> # and deploy the nrpe subordinate to test nagios checks
> - cls.deployment.add('nrpe')
> + cls.deployment.add('nrpe-{}'.format(cls.series), 'nrpe')
>
> # set nrpe to export its definitions
> - cls.deployment.configure('nrpe', {
> + cls.deployment.configure('nrpe-{}'.format(cls.series), {
I don't think you require the series to be inserted into the application name, as I don't think you have both series deployed at the same time. But it is probably better for when things go wrong.
> 'export_nagios_definitions': True,
> })
>
> # relate subordinates to parent charm
> cls.deployment.relate(
> - 'mongodb:juju-info',
> - 'canonical-livepatch:juju-info'
> + 'mongodb-{}:juju-info'.format(cls.series),
> + 'livepatch-{}:juju-info'.format(cls.series)
> )
> cls.deployment.relate(
> - 'mongodb:nrpe-external-master',
> - 'nrpe:nrpe-external-master'
> + 'mongodb-{}:nrpe-external-master'.format(cls.series),
> + 'nrpe-{}:nrpe-external-master'.format(cls.series)
> )
>
> # relate livepatch to nrpe for its own nagios checks
> cls.deployment.relate(
> - 'canonical-livepatch:nrpe-external-master',
> - 'nrpe:nrpe-external-master'
> + 'livepatch-{}:nrpe-external-master'.format(cls.series),
> + 'nrpe-{}:nrpe-external-master'.format(cls.series)
> )
>
> try:
--
https://code.launchpad.net/~barryprice/canonical-livepatch-charm/+git/multiseries-testing/+merge/363797
Your team Livepatch charm developers is subscribed to branch canonical-livepatch-charm:master.
References