Skip to content
Snippets Groups Projects
Commit 266df2eb authored by Markus Thoemmes's avatar Markus Thoemmes
Browse files

Surface proper message when rule update failed due to trigger absence

parent 6068da27
No related branches found
No related tags found
No related merge requests found
......@@ -572,6 +572,18 @@ class RulesApiTests extends ControllerTestCommon with WhiskRulesApi {
}
}
it should "reject rule activation, if the trigger is absent" in {
implicit val tid = transid()
val ruleName = aname
val ruleNameQualified = Namespace(WhiskEntity.qualifiedName(namespace, ruleName))
val triggerName = aname
val rule = WhiskRule(namespace, ruleName, triggerName, EntityName("an action"))
put(entityStore, rule)
Post(s"$collectionPath/${rule.name}", activeStatus) ~> sealRoute(routes(creds)) ~> check {
status should be(NotFound)
}
}
it should "deactivate rule" in {
implicit val tid = transid()
val ruleName = aname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment