Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
def test_a_step_without_action_is_silent():
step = {}
assert apply_action(step, layers) is None
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)