Commit Graph

13 Commits

Author SHA1 Message Date
Liam Young b36c9bde25 Removing vault specific tests to cleanup mp 2018-03-26 08:28:10 +00:00
Liam Young 502b96c772 Add helps for charm functional tests
The idea of this change is to put together helpers for including
functional tests for charms in a central location. The charm
declares the tests and bundles to be run to complete a
functional tests but the tests themselves live here in zaza.

To use this code the charm should have the following:

1) zaza in the test-requirements.txt
2) tox.ini should include a target like:
```
[testenv:func35]
  basepython = python3
  commands =
    functest-bundle-deploy
```

3) Bundles which are to be used for the tests:
```
ls -1 tests/bundles/*
tests/bundles/xenial.yaml
```

4) A tests/tests.yaml file that describes the bundles to be run and
   the tests
```
charm_name: vault
tests:
  - zaza.charms_tests.vault.VaultTest
gate_bundles:
  - xenial
dev_bundles:
  - bionic
```

Tests can be run without running a deployment using functest-run-tests
with the list of test classes to be run:

```
functest-run-tests -t zaza.charms_tests.vault.VaultTest
```

Known Issues:

 - The deploy_bundle and add_model methods should be using libjuju
 - DEV_BUNDLES is currently ignored
 - VaultUtils and VaultTest should probably be in separate files.
 - When skipIfNotHA skips a test unittest does not pick up it has
   been skipped
 - A new model is created for each bundle even if an existing empty
   model exists
 - No model cleanup is performed.
2018-03-26 08:28:10 +00:00
David Ames 5dbd8f10f0 Merge pull request #2 from openstack-charmers/add-travis
Add travis ci
2018-03-22 15:57:49 -07:00
Ryan Beisner 246cfd07b6 Update travis definition 2018-03-22 15:25:42 -05:00
Ryan Beisner 62c28c675b Move pep8 back to 3.6 due to async usage 2018-03-22 15:23:37 -05:00
Ryan Beisner d6c07d1d72 Try to get travis to use xenial 2018-03-22 15:16:39 -05:00
Ryan Beisner ce93194a1f Fix additional lint 2018-03-22 15:13:53 -05:00
Ryan Beisner 5bb735bb28 Fix existing lint 2018-03-22 15:10:58 -05:00
Ryan Beisner 58579384aa Allow pep8 tox target to use any py3 version 2018-03-22 14:29:45 -05:00
Ryan Beisner ba2732024d Add travis ci 2018-03-22 14:26:40 -05:00
Chris MacNaughton ddbbce3712 remove extra comments 2017-12-04 17:38:52 +01:00
Chris MacNaughton 895fbbad57 add current-apps script 2017-12-04 17:38:16 +01:00
Chris MacNaughton c3e5adcb4d initial commit framing out stuff 2017-12-04 17:01:33 +01:00