Commit Graph

21 Commits

Author SHA1 Message Date
Ryan Beisner f9d6203f4b Log overlays and template renders for greater visibility 2018-11-30 15:22:47 -06:00
David Ames f6fe86e282 Allow OSCI environment variables
Zaza explicitly limits which environment variables are allowed for
template rendering. Allow the variables that OSCI actually uses. Without
this OSCI fails to render vips.

This enables zaza tests with HA in OSCI.
2018-11-05 15:28:04 -08:00
Chris MacNaughton 11133ccd1f fix up local template rendering 2018-10-17 09:32:49 +02:00
Chris MacNaughton cc893ae851 Add tests derived from tests.yaml in the target directory 2018-10-17 09:20:23 +02:00
Alex Kavanagh a2aeba613d Add model name to bundle log message
This simply adds the model name to the log message that the bundle
is being deployed to so the user can see which model got which bundle.
2018-09-20 10:45:33 +02:00
Nicolas Pochet d6fa8799d3 Add logging level configuration for all functest-*
Fixes #117
2018-08-20 11:05:38 +02:00
Nicolas Pochet 193e2657ff Add copyright header everywhere.
Also make flake8 happy in setup.py by adding docstrings.
2018-08-09 11:55:13 +02:00
Liam Young f830aaa90c Allow charms to override local overlay
The local overlay ('local-charm-overlay.yaml') is generated on the
fly during deploy time and it assumes that the application name
will match the charm name. However this is not always the case so
allow charms to override the deploy time generated template with
one from the local tests/bundle/overlay directory.

This is really another stop-gap until the whole bundle generation
piece is rewritten.
2018-07-30 07:32:18 +00:00
Liam Young 9d06bb890f Move call to get_juju_model() down to run_in_model
Currently interacting with functions in zaza.model requires the
model to be passed in. This has resulted in multiple calls to
get_juju_model(). It is cleaner to push these calls down into
the model wrapper and make the model_name an optional
argument. In addition, the current model name is now cached
without having to check the os.env each time.

Unfortunately this has resulted in the signature changing on a
great many function so this diff is bigger than would normally
be desirable.
2018-06-14 06:19:26 +01:00
Liam Young c2b8992b2e More docstring tidyup 2018-06-13 13:35:32 +01:00
Liam Young 68114544bd Add the ability to wait for bespoke statuses (#38)
* Add the ability to wait for bespoke statuses

This change adds the ability to wait for bespoke work load
statuses and messages. These are defined in the charms tests.yaml

* Add unit tests

* Remove debug print

* Fix typos and add checks for  errored units

* Restore juju_wait as openstack_utils imports it
2018-04-25 09:48:31 +01:00
David Ames 4278e5822d Neutron dynamic routing testing
Add the testing required for neutron dynamic routing A.K.A dragent.
Create the zaza.charm_tests.dragent module for testing neutron dynamic
routing.
Create the zaza.configure module for reusable configuration tools.
Update utilities to simplify authenticating clients.
2018-04-18 16:14:23 -07:00
Liam Young 56b0f556a6 Add the missing t 2018-04-18 08:57:38 +00:00
Liam Young 2e522f2ab4 Render local charm overlay from string
Stop requiring the charm to ship with a boiler plate overlay for
setting a relative path for local charm location. Instead render the
overlay from a string var. As part of this some of the template
rendering code was refactored.
2018-04-18 07:35:55 +00:00
Liam Young ed98e8f02d Stop missing overlay templates from being fatal
Not all deployments will use overlays so a missing template should
not be fatal
2018-04-17 12:00:17 +00:00
Liam Young 51fb79c24f More env var refinement 2018-04-16 14:17:57 +00:00
Liam Young 7f09add0d0 Switch to OS_ as the prefix for environment variables that can be used in overlay template rendering 2018-04-16 14:13:23 +00:00
Liam Young e22fa7bbf5 Add support for model specific bundle overlays
This change adds support for model specific overlays from
templates which are rendered at deploy time.

The overlay template directory will be searched for a corresponding
template (<bundle_name>.j2). If one is found then the overlay will
be rendered using environment variables matching AMULET* or
ZAZA_TEMPLATE* as a context. The rendered overlay will be used on
top of the specified bundle at deploy time.

A default overlay is always applied "local-charm-overlay.yaml". This
overlay is only used to move the location of the charm being deployed
to a relative path so the bundle can use "charm: <charm name>" rather
than "charm: ../../../<charm name>"
2018-04-16 13:26:33 +00:00
Liam Young 67984a231b Fix juju wait to work against correct model
juju_wait assumes it is working against the current model so
explicitly set the JUJU_MODEL env variable before calling it
to ensure it monitors the correct environment
2018-04-12 15:31:55 +00:00
Liam Young cb5d9caf66 Misc fixes to functional testing code
* Add calls to asyncio.get_event_loop().close() to close loop. libjuju does
  not do this for you and needs to be done just before exiting.
* Require model to be explicitly set when running command line tools. This is
  part of the drive to ensure that eventually multiple runs can be performed
  concurrently.
* Add set_juju_model/get_juju_model functions to manage which model is in
  focus
2018-03-28 11:48:53 +00:00
Liam Young 353559528b s/charm_testing/charm_lifecycle/ and unit tests 2018-03-27 12:35:38 +00:00