Improved integration tests 61/6561/2
authorAdam Israel <adam.israel@canonical.com>
Fri, 21 Sep 2018 12:20:55 +0000 (14:20 +0200)
committerAdam Israel <adam.israel@canonical.com>
Tue, 25 Sep 2018 17:59:28 +0000 (13:59 -0400)
commitfc511ed0e2f3bbbdc0ccaa6b0d6ae7cc57b029f9
tree0fff4cfc832ed8a26577e5e77954bca5aa300caf
parent13950825f557fdc7f8e0859c1d10b63c5e57cfea
Improved integration tests

This merge includes a refactored integration test framework, to better
take advantage of asyncio, and clarifies the test logic so it's easier
to extend in the future. It also supports testing of more complex VNFs,
such as multi-vdu, multi-charm VNFs.

n2vc/vnf.py:
- Remove duplicate status filtering, as it was a poor solution and lead
to situations where some callbacks were not sent.
- Added an internal refcount to track libjuju instantiation (helpful in
debugging)

tests/charms/layers/proxy-ci/reactive/proxy_ci.py:
- Fix name of install function (remove confusion while reading logs)

tests/base.py:
- Add debug() for more consistent and useful logging
- Refactor: remove parse_metrics
- Improved error handling
- Better LXD network connectivity verification
- Refactor test framework:
    - Better use of async coded
    - Make handling of test phase more robust
    - Support more complex test cases, such as multi-vdu, multi-charm

tests/integration/*
- Update to use refactored test framework

Other:
- `make clean` now removes charm artifacts in tests/charms/builds/
- `make lint` now ignores charm artifacts

Signed-off-by: Adam Israel <adam.israel@canonical.com>
Change-Id: I43a6d573a7bafdfe3ccb0bb0f0f7d75dcc9c42b1
14 files changed:
.gitignore
Makefile
n2vc/vnf.py
tests/base.py
tests/charms/layers/proxy-ci/reactive/proxy_ci.py
tests/integration/test_charm_native.py
tests/integration/test_charm_proxy.py
tests/integration/test_metrics_native.py
tests/integration/test_metrics_proxy.py
tests/integration/test_multivdu_multicharm.py
tests/integration/test_no_initial_config_primitive.py
tests/integration/test_no_parameter.py
tests/integration/test_non_string_parameter.py
tox.ini