Commit Graph

27 Commits

Author SHA1 Message Date
Liam Young debd7ec645 Support vault api behind https 2018-07-11 12:47:24 +00:00
Liam Young 30c8ad4c97 Fix remaining docstrings in zaza/*
Fix remaining docstrings in zaza/*, the unit_tests/* still need
work.
2018-06-18 13:12:43 +01:00
Liam Young 9b26376a19 A few fixes 2018-06-14 06:20:05 +01: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 fec2acfa9d Skip csr client tests if there is no client 2018-06-05 15:27:36 +01:00
Liam Young 12317054d2 Lint fixes 2018-05-31 09:06:03 +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
Liam Young 8ca82a6dd5 Merge pull request #48 from openstack-charmers/dragent-infer-asn-from-deployment
Infer ASn from deployment for BGP speaker test configuration
2018-05-16 08:49:44 +01:00
Liam Young bb2d3531b4 Test Vault certificates relation (#49)
* Test vault issuing certs

* Fixes to bring tests inline with helpers

* Update action name
2018-05-15 15:02:06 +01:00
Frode Nordahl 3684d199d5 Fix incorrect import
setup_logging() moved from utilities.generic -> utilities.cli
2018-05-15 08:17:12 +02:00
David Ames a73f513b97 Shortname utilitites 2018-05-14 10:49:49 -07:00
David Ames f2982a4f1f Split _local_utils into functional modules
The _local_utils module was misnamed as the utilities it contained
may be used outside of zaza proper. For example in mojo.

This change separates the utilities into functional modules:

 cli_utils: For utilities pertaining to running scripts from command line.
 juju_utils: For utilities pertaining to juju commands.
 generic_utils: For helper utilities that are generic in nature.
2018-05-14 10:49:49 -07:00
Frode Nordahl a87da7afd1 Merge pull request #30 from thedac/feature/dragent
Neutron dynamic routing testing
2018-04-20 19:40:34 +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
Liam Young 9861ca6f4d Vault charm action needs to be run on leader
The vault charm action to authorise the charm within vault needs to
be run on the leader. This mp adds run_action_on_leader to support
that and updates the tests.
2018-04-20 13:40:52 +00:00
David Ames 6ad3745206 Separate overcloud and undercloud settings
Changed the name of configure_dragent
Removed the network.yaml file requirement for tests
Made a bright line distinction between declared overcloud network
settings and environment specific undercloud settings
The tests will declare the overcloud settings and acquire the
undercloud settings from environment variables.
2018-04-19 14:42:29 -07:00
Liam Young bcfd6aaf30 Add tests for vault authorize-charm action
Add tests for the authorize-charm action on the vault app. To
support this add get_action method to return an applications
actions. However, this is not implemented in libjuju yet so
fallback to subprocess
2018-04-19 11:41:09 +00: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 b40ddae08c Update vault tests for paramater reordering 2018-04-18 15:36:32 +00: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
Liam Young cb11ddd1e9 Fix skip decorator 2018-03-29 06:07:12 +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 a1f80dced7 Add vault tests 2018-03-29 05:39:57 +00:00
Liam Young 3951d6f389 Fix lint 2018-03-26 08:32:38 +00:00
Liam Young 86b99c1134 Refactor code to seperate phases out 2018-03-26 08:32:38 +00:00