charm-swift-proxy/tests
David Ames 1d5b7af20c [corey.bryant, r=thedac] Workload Status 2015-10-13 10:17:22 -07:00
..
charmhelpers Resync charms 2015-10-10 14:31:55 -07:00
00-setup update test dependencies 2015-10-05 16:03:31 +00:00
010-basic-precise-essex update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
014-basic-precise-icehouse auto rename amulet tests 2015-04-16 21:36:06 +00:00
015-basic-trusty-icehouse auto rename amulet tests 2015-04-16 21:36:06 +00:00
016-basic-trusty-juno auto add amulet tests for supported releases 2015-04-16 21:36:19 +00:00
017-basic-trusty-kilo update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
019-basic-vivid-kilo update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
020-basic-trusty-liberty update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
021-basic-wily-liberty update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
README update makefile, test dependencies, meta categories; disable essex amulet test; add liberty amulet test definitions (disabled pending liberty pkgs). enable kilo amulet test targets. 2015-08-21 16:48:47 +00:00
basic_deployment.py Amulet test update 2015-10-13 09:36:47 -04:00
tests.yaml update test dependencies 2015-10-05 16:03:31 +00:00

README

This directory provides Amulet tests that focus on verification of swift-proxy
deployments.

test_* methods are called in lexical sort order, although each individual test
should be idempotent, and expected to pass regardless of run order.

Test name convention to ensure desired test order:
    1xx service and endpoint checks
    2xx relation checks
    3xx config checks
    4xx functional checks
    9xx restarts and other final checks

In order to run tests, you'll need charm-tools installed (in addition to
juju, of course):
    sudo add-apt-repository ppa:juju/stable
    sudo apt-get update
    sudo apt-get install charm-tools

If you use a web proxy server to access the web, you'll need to set the
AMULET_HTTP_PROXY environment variable to the http URL of the proxy server.

The following examples demonstrate different ways that tests can be executed.
All examples are run from the charm's root directory.

  * To run all tests (starting with 00-setup):

      make test

  * To run a specific test module (or modules):

      juju test -v -p AMULET_HTTP_PROXY 15-basic-trusty-icehouse

  * To run a specific test module (or modules), and keep the environment
    deployed after a failure:

      juju test --set-e -v -p AMULET_HTTP_PROXY 15-basic-trusty-icehouse

  * To re-run a test module against an already deployed environment (one
    that was deployed by a previous call to 'juju test --set-e'):

      ./tests/15-basic-trusty-icehouse

For debugging and test development purposes, all code should be idempotent.
In other words, the code should have the ability to be re-run without changing
the results beyond the initial run.  This enables editing and re-running of a
test module against an already deployed environment, as described above.

Manual debugging tips:

  * Set the following env vars before using the OpenStack CLI as admin:
      export OS_AUTH_URL=http://`juju-deployer -f keystone 2>&1 | tail -n 1`:5000/v2.0
      export OS_TENANT_NAME=admin
      export OS_USERNAME=admin
      export OS_PASSWORD=openstack
      export OS_REGION_NAME=RegionOne

  * Set the following env vars before using the OpenStack CLI as demoUser:
      export OS_AUTH_URL=http://`juju-deployer -f keystone 2>&1 | tail -n 1`:5000/v2.0
      export OS_TENANT_NAME=demoTenant
      export OS_USERNAME=demoUser
      export OS_PASSWORD=password
      export OS_REGION_NAME=RegionOne

  * Sample swift command:
      swift -A $OS_AUTH_URL --os-tenant-name services --os-username swift \
            --os-password password list
      (where tenant/user names and password are in swift-proxy's nova.conf file)