How to use the chaostoolkit.plan.apply_action function in chaostoolkit

To help you get started, we’ve selected a few chaostoolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chaostoolkit / chaostoolkit / tests / test_plan.py View on Github external
def test_action_must_be_implemented():
    step = {
        "action": {
            "layer": "noop",
            "name": "microservice-goes-boom",
            "parameters": {
                "name": "cherrypy-webapp"
            }
        }
    }

    with pytest.raises(UnknownAction) as excinfo:
        apply_action(step, layers)

    assert "action 'microservice_goes_boom' is not implemented" in str(excinfo)
github chaostoolkit / chaostoolkit / tests / test_plan.py View on Github external
def test_a_step_without_action_is_silent():
    step = {}
    assert apply_action(step, layers) is None
github chaostoolkit / chaostoolkit / tests / test_plan.py View on Github external
def test_action_needs_a_name():
    step = {
        "action": {
            "parameters": {
                "name": "cherrypy-webapp"
            }
        }
    }

    with pytest.raises(InvalidPlan) as excinfo:
        apply_action(step, layers)

    assert "action requires a name" in str(excinfo)