failtester #7

  • By hatch
  • Latest version (#7)
  • precise
  • Stable
  • Edge

Description

WARNING: This is charm is for Juju development testing only.
In order to allow for testing of real charm failures in
real environments you can use this charm and set the appropriate
configuration values for the failure you would like to test.


Overview

WARNING: This is charm is for Juju development testing only.

In order to allow for testing of real charm failures in real environments you
can use this charm and set the appropriate configuration values for the failure
you would like to test. To set a hook to fail simply set the appropriate
configuration value to true for the desired hook failure.

Installation

Bootstrap a Juju environment:

juju bootstrap

To deploy the failtester charm from the command line:

juju deploy cs:~hatch/precise/failtester

To deploy the failtester charm from the GUI perform a search for 'failtester'
then drag the charm from the result list onto the canvas, configure it, and
click 'Deploy'.

How to use

If you are trying to test hook failure hook other than the config-changed hook
failure you will need to make sure that the config-changed configuration value
is set to false else the config-changed hook will fail.

Install hook failures

If you would like an install hook failure then you will need to set it
immediately after deploying this charm so that it doesn't run before you have
a chance to set it.

On the command line:

juju set failtester install=true

In the GUI click on the wrench symbol, change the install configuration option
to true then click Save changes.

Relation hook failures

If you would like a relation hook failure then you will need to deploy two
instances of this charm with different names.

On the command line:

juju deploy cs:~hatch/precise/failtester
juju deploy cs:~hatch/precise/failtester failtester2

In the GUI drag the charm to the canvas twice but the second time change the
service name in the inspector before deploying.

Then set the appropriate configuration value for the relation hook you would
like to fail.

On the command line:

juju set failtester relation-changed=true

In the GUI click on the wrench symbol, change the relation-changed
configuration option to true then click Save changes.

Note: failtester has a persistent peer relation. To have this relation fail you
need to set it to true immediately after deploy:

juju set failtester peer-relation=true

Configuration

relation-broken
(boolean) Trigger relation-broken hook failure.
upgrade-charm
(boolean) Trigget upgrade-charm hook failure.
start
(boolean) Trigger start hook failure.
stop
(boolean) Trigger stop hook failure.
relation-changed
(boolean) Trigger relation-changed hook failure.
peer-relation
(boolean) Trigger relation failures on peer relation.
relation-joined
(boolean) Trigger relation-joined hook failure.
config-changed
(boolean) Trigger config-changed hook failure.
install
(boolean) Trigger install hook failure.
relation-departed
(boolean) Trigger relation-departed hook failure.