Skip to content

openstack-charmers/charmed-openstack-tester

Repository files navigation

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:

Getting Started

Common setup:

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:

tox -e func-target jammy-yoga

Deploy and test all smoke bundles:

tox -e func-smoke

Re-run a specific zaza phase:

source .tox/func-smoke/bin/activate
cd tests/<scenario>/
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:

tests_options:
  tempest:
    model_alias_smoke:
      smoke: True
    model_alias_targeted:
      whitelist:
         - "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers"
         - "tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details"
      blacklist:
         - "tempest.api.identity.admin.v3.test_policies.PoliciesTestJSON.test_create_update_delete_policy"
      regex:
         - "tempest.api.network.*"

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:

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:

# 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:

tests_options:
  overlay_ppas:
    - ppa:ubuntu-security-proposed/ppa

Contact

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

About

Deploys OpenStack clouds and runs tempest (or other tests) against them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 14