dubeejw commented on a change in pull request #3254: Preserve rule status when 
rule is updated
URL: 
https://github.com/apache/incubator-openwhisk/pull/3254#discussion_r168010760
 
 

 ##########
 File path: tests/src/test/scala/system/basic/WskRuleTests.scala
 ##########
 @@ -88,6 +88,35 @@ abstract class WskRuleTests extends TestHelpers with 
WskTestHelpers {
 
   behavior of "Whisk rules"
 
+  it should "preserve rule status when a rule is updated" in 
withAssetCleaner(wskprops) { (wp, assetHelper) =>
+    val ruleName = withTimestamp("r1to1")
+    val triggerName = withTimestamp("t1to1")
+    val actionName = withTimestamp("a1 to 1")
+    val triggerName2 = withTimestamp("t2to1")
+    val active = Some("active".toJson)
+    val inactive = Some("inactive".toJson)
+    val statusPermutations =
+      Seq((triggerName, active), (triggerName, inactive), (triggerName2, 
active), (triggerName2, inactive))
+
+    ruleSetup(Seq((ruleName, triggerName, (actionName, actionName, 
defaultAction))), assetHelper)
+    assetHelper.withCleaner(wsk.trigger, triggerName2) { (trigger, name) =>
+      trigger.create(name)
+    }
+
+    statusPermutations.foreach {
 
 Review comment:
   Makes sure `wsk rule update` and `wsk rule get` return the proper status.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to