Commit Graph

77 Commits

Author SHA1 Message Date
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
Frode Nordahl
8155057e36 Merge pull request #22 from gnuoy/fix-fatal-missing-template
Stop missing overlay templates from being fatal
2018-04-17 14:37:02 +02: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
James Page
aa6573bece Merge pull request #20 from gnuoy/dynamic-bundles
Add support for model specific bundle overlays
2018-04-17 11:55:22 +01:00
Liam Young
e21dc50fdd Update readme 2018-04-16 14:21:35 +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
James Page
fa0c31ba1b Merge pull request #19 from gnuoy/fix-pip
removed unused python-apt
2018-04-16 09:33:05 +01:00
Liam Young
e29a4cd34e removed unused python-apt 2018-04-16 08:12:51 +00:00
Liam Young
f1d08eab4e Merge pull request #18 from thedac/utilities
Add create port and create floating ip
2018-04-16 08:04:26 +01:00
David Ames
621baa4ee0 Add create port and create floating ip
Add utilities
2018-04-13 16:46:31 -07:00
Liam Young
1946e16483 Merge pull request #15 from thedac/run_on_unit
Use libjuju unit.run for juju_run
2018-04-13 15:53:39 +01:00
David Ames
44920b9790 Remove dynamic default arguments 2018-04-13 07:48:21 -07:00
Chris MacNaughton
2faaaf0005 Merge pull request #17 from gnuoy/vault-vip-tests
Update vault tests for VIP testing
2018-04-13 16:20:31 +02:00
Liam Young
2dfa16751f Update vault tests for VIP testing
Update vault tests to support an explicit client pointing at the
vip. Also, switch to using a namedtuple for managing the clients
to allow client metadata to be stored along with the hvac client.
2018-04-13 13:09:57 +00:00
David Ames
bcf8a21c35 Fix set_appliction_config 2018-04-12 16:28:48 -07:00
David Ames
9afd421bd1 Use openrc 2018-04-12 16:15:09 -07:00
David Ames
6eae8a0fbb Use libjuju unit.run for juju_run
Use libjuju for juju run commands
Add unit test for model.run_on_unit
2018-04-12 10:43:35 -07:00
Ryan Beisner
16bc6c0df0 Merge pull request #14 from gnuoy/fix-juju-wait-wrong-model
Fix juju wait to work against correct model
2018-04-12 10:49:10 -05: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
David Ames
2206387c34 Merge pull request #12 from gnuoy/enable-support-for-smoke
Add support for running smoke tests
2018-04-12 08:19:02 -07:00
Liam Young
a78f76e576 Fix tox target names in example 2018-04-12 13:45:22 +00:00
Liam Young
f99af2f14c Add support for running smoke tests
Add --smoke switch to functest-run-suite to allow just the smoke
tests for a charm to be run. This requires that the smoke test
bundles are listed in the charms tests/tests.yaml
2018-04-12 12:43:07 +00:00
Chris MacNaughton
29c3d355b8 Merge pull request #11 from gnuoy/keep-model
Add option to functest-run-suite to skip model deletion
2018-04-12 10:04:15 +02:00
Liam Young
a096956350 Preserve osci's keep the last model behaviour 2018-04-11 14:52:17 +00:00
Liam Young
3b90ed1a50 Add option to functest-run-suite to skip model deletion 2018-04-11 14:23:41 +00:00
Liam Young
b6fb4ecfa5 Merge pull request #8 from thedac/network-utils
Bring over network specific utilities
2018-04-11 07:27:31 +01:00
David Ames
bb884f4042 Merge pull request #9 from gnuoy/functest-utils-vault
Add vault specific setup, tests etc
2018-04-10 19:37:02 -07:00
David Ames
612eefe939 Docstrings and renames
Removed unused functions
Docstrings for all functions

Renamed test_utils to _local_utils to indicate use only by zaza
2018-04-10 17:04:57 -07:00
David Ames
22e7ffc1e1 Bring over network specific utilities
Bring over only those utilities required to run network_setup.py from
openstack-mojo-specs. These utilities have been generalized and python3
configured. Use libjuju whenever possible and pre-deprecate anything
else.

Add addition functions to the model.
2018-03-30 16:41:17 -07:00
David Ames
99710b5e83 Merge pull request #6 from gnuoy/functest-libjuju-model
Functest libjuju model
2018-03-29 10:01:49 -07:00
Liam Young
cb11ddd1e9 Fix skip decorator 2018-03-29 06:07:12 +00:00
Liam Young
8104b0e7fd Pull in new model file 2018-03-29 05:54:13 +00:00
Liam Young
fa43b720fb Fix tests given model updates 2018-03-29 05:40:54 +00:00
Liam Young
79f396eef7 Lint fixes 2018-03-29 05:40:54 +00:00
Liam Young
8c8bd82c7e Add temp model helpers 2018-03-29 05:39:57 +00:00
Liam Young
a1f80dced7 Add vault tests 2018-03-29 05:39:57 +00:00
Liam Young
117ae4127d Add function to scp file to all units 2018-03-29 05:35:49 +00:00
Liam Young
59a9b7f0cb Add helper utils for interacting with juju environment 2018-03-29 05:35:49 +00:00
David Ames
5c4c10af6b Merge pull request #4 from gnuoy/functest-fixes
Functest fixes
2018-03-28 10:02:46 -07:00
Liam Young
9bdd4763cc Close event loop in func_test_runner.main 2018-03-28 12:00:53 +00:00
Liam Young
f22b05f827 Fix unit tests 2018-03-28 11:56:29 +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
David Ames
7b154bb463 Merge pull request #1 from gnuoy/functest-utils
Add helps for charm functional tests
2018-03-27 07:48:03 -07:00
Liam Young
a47936361b Bump upper bound for flake8 to fix async lint errors 2018-03-27 13:21:28 +00:00
Liam Young
3d190f68f3 Fix generate_model_name 2018-03-27 12:45:59 +00:00
Liam Young
98f691b24e Fix setup.py after rename of charm_testing 2018-03-27 12:37:36 +00:00
Liam Young
353559528b s/charm_testing/charm_lifecycle/ and unit tests 2018-03-27 12:35:38 +00:00
Liam Young
5d61c46a81 Fix README typos 2018-03-26 13:34:02 +00:00