openstack-charmers / charmed-openstack-tester

Deploys OpenStack clouds and runs tempest (or other tests) against them
Apache License 2.0
6 stars 14 forks source link

======================== Charmed OpenStack Tester

Charmed OpenStack Tester deploys OpenStack clouds and runs tempest (or other tests) against them.

It uses the following to get this done:

.. _OpenStack Charms: https://docs.openstack.org/charm-guide .. _zaza: https://github.com/openstack-charmers/zaza .. _zaza-openstack-tests: https://github.com/openstack-charmers/zaza-openstack-tests .. _Juju: https://juju.is/docs .. _tempest: https://github.com/openstack/tempest

Getting Started

Common setup:

.. code-block:: bash

source ~/novarc export TEST_HTTP_PROXY=http://squid.internal:3128 export TEST_FIP_RANGE=10.5.150.0:10.5.200.254 export TEST_CIDR_EXT=10.5.0.0/16 export TEST_GATEWAY=10.5.0.1 export TEST_NAME_SERVER=10.245.168.6 export TEST_CIDR_PRIV=192.168.21.0/24 export TEST_SWIFT_IP=10.245.161.162

Deploy and test a specific bundle:

.. code-block:: bash

tox -e func-target jammy-yoga

Deploy and test all smoke bundles:

.. code-block:: bash

tox -e func-smoke

Re-run a specific zaza phase:

.. code-block:: bash

source .tox/func-smoke/bin/activate cd tests// juju deploy -m MODEL BUNDLE functest-configure -m MODEL_ALIAS:MODEL functest-test -m MODEL_ALIAS:MODEL

Specifying Tests to Run

Specifying which tests to run can be done with the following keys: smoke, whitelist, blacklist, and regex. For example:

.. code-block:: yaml

tests_options: tempest: model_alias_smoke: smoke: True model_alias_targeted: whitelist:

Debugging Tests

By default, the tempest workspace gets cleaned up after each tempest run. To keep the workspace around for re-running tests, set keep-workspace to True in tests.yaml:

.. code-block:: yaml

tests_options: tempest: model_alias: smoke: True keep-workspace: True

Then, update tests.yaml with whitelist of failing tests and re-run tests with functest-test.

Client environment auth scripts are located in the scripts directory for manually running OpenStack commands:

.. code-block:: bash

For xenial-pike and below

source scripts/novarc

For xenial-queens through bionic-ussuri

source scripts/novarcv3_domain source scripts/novarcv3_domain

For focal-ussuri and above

source scripts/novarcv3_ssl_domain source scripts/novarcv3_ssl_domain

Test with an Overlay PPA

Set up an overlay PPA on each machine in the model:

.. code-block:: yaml

tests_options: overlay_ppas:

Contact

IRC: #openstack-charms on Freenode (irc.freenode.net)