Skip to main content

Tools for automated distributed juju charm testing.

Project description

Automated Charm Testing

Reusable components and utilities for juju:http://juju.ubuntu.com charm testing.

There are several different use cases for testing from jenkins waterfall views, to gating publishing to a repository based on test results.

In order to accomodate different running scenarios, the tools are presented as a set of cli tools.

All the tools operate against the default juju environment.

Runner

Provides the main entry point into charm testing. It will generate and run a test and record the result and environment information:

$ juju-graph-runner -r repository -w working_dir -s series -t testrecord.zip <charm_name>

Planner

For a given charm change calculate a series of test plans against a repository of all charms:

$ juju-planner -r repository  -s precise -d plans_dir <charm_name>

Snapshot

Snapshot and restore an environment, akin to a bzr shelve. Primary purpose it to be able to clear out services from an environment so the environment can be reused across tests.

Operates on a service granularity, destroying and removing old services not present in before the last snapshot in a pop:

 $ juju-snapshot snapshot -f pristine.json
 $ juju deploy --repository=examples local:mysql
 $ juju-snapshot restore -f pristine.json

- Clean an environment for reuse, via deleting services.
- Resets provider storage of any uploaded charms.
- Removes any charm state from zookeeper.

Loader

Load a test plan’s services and relations into an environment:

$ juju-load -r repository mediawiki.plan

Watch

Verification for a service coming up correctly, waits for a given service and all its relations to reach a completed steady state or any reach a failure state:

$ juju-watch <service_name>

Exit code 1 if the wait failed, stderr with more details. Exit 0 if succesful.

Test Records

Create an archive of all the unit logs, zookeeper data, status, and test runner logs:

$ juju-record -f testrecord.zip

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

charmrunner-0.2.0.tar.gz (12.0 kB view details)

Uploaded Source

File details

Details for the file charmrunner-0.2.0.tar.gz.

File metadata

  • Download URL: charmrunner-0.2.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for charmrunner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 47c82bd8ed929e082b8315da346e14ade890f066d43615897cbbe56da6792422
MD5 91ee4f6e1ef521cac65ef8866082101c
BLAKE2b-256 ae9a55d124a4e8b9c7578b7fa7650584b4ccc7821f91ba7e6f7f225b18706f82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page