Commit Graph

24 Commits

Author SHA1 Message Date
Chris MacNaughton
dd434e281e Add zaza namespacing, starting with openstack 2019-04-25 17:46:03 +02:00
David Ames
bcecba0a53 Declare swfitclient requirement
When zaza is installed as a dependency it requires swiftclient.
Guarantee swiftclient is installed as a dependency of zaza.
2019-02-08 16:28:24 -08:00
Frode Nordahl
e1f360f823 Add helper to get authenticated octaviaclient 2018-11-29 06:29:06 +01:00
James Page
29944df5d4 Avoid hvac 0.7.x series for now as its breaks tests. 2018-11-12 14:34:10 +00:00
Liam Young
69698ea57d Merge pull request #142 from ChrisMacNaughton/bundle-flattener
Add support for removing machine placement in a bundle
2018-10-12 12:34:19 +01:00
Chris MacNaughton
362ce7bac5 rename flatten-bundle to remove-placement 2018-10-10 11:34:31 +02:00
Nicolas Pochet
b3996949b8 Add ceph osd tests (#93)
Create functional tests replacing the Amulet tests that are currently used for testing.
2018-10-10 09:09:06 +02:00
Chris MacNaughton
89527526f5 Add support for removing machine placement in a bundle 2018-10-09 17:37:40 +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
b3060f96ce Add missing glance dependency 2018-06-05 10:01:54 +00:00
David Ames
031e2eb9c4 Merge pull request #54 from gnuoy/glance_tests
Add tests for testing the glance charm
2018-05-31 10:52:22 -07:00
Liam Young
7517faf19a Add a bit of sphinx 2018-05-30 15:29:45 +01:00
Liam Young
56c8d60dcd Add tests for testing the glance charm
* Add OpenStackAPITest class which can be used by OpenStack API
  charms. It provides the framework for common tests like pause
  and resume. It also provides lower level entites like an
  authenticated keystone session.
* Add generic openstack resource managment functions to
  zaza.utilities.openstack. These are based on existing functions
  in charmhelpers. Main difference is that they use tenacity to
  manage retry logic and throw AssertionError if then required state
  is not reached rather than returning True/False
* Add image management functions to zaza.utilities.openstack.
* Add set of glance setup/configuration/tests. These are equivalent
  to the existing glance amulet tests with all the introspection
  tests removed (see below for more detail).

Tests replicated here:
    test_410_glance_image_create_delete
    test_411_set_disk_format
    test_900_glance_restart_on_config_change
    test_901_pause_resume

Tests removed
    test_100_services
    test_102_service_catalog
    test_104_glance_endpoint
    test_106_keystone_endpoint
    test_110_users
    test_115_memcache
    test_200_mysql_glance_db_relation
    test_201_glance_mysql_db_relation
    test_202_keystone_glance_id_relation
    test_203_glance_keystone_id_relation
    test_204_rabbitmq_glance_amqp_relation
    test_205_glance_rabbitmq_amqp_relation
    test_300_glance_api_default_config
    test_302_glance_registry_default_config
2018-05-30 13:40:50 +01:00
Frode Nordahl
092c3c1f6b Add utility helper function for generating X.509 certs 2018-05-01 14:17:10 +02:00
David Ames
aa6d170a6c Use tenacity for binary back off
Use the tenacity module to handle retry and binary back off of test
BGP test assertions.
2018-04-20 10:22:22 -07: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
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
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
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
86b99c1134 Refactor code to seperate phases out 2018-03-26 08:32:38 +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
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