markusthoemmes commented on a change in pull request #3950: Extend system 
testsuite
URL: 
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r208497864
 
 

 ##########
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##########
 @@ -210,6 +253,32 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
     }
   }
 
+  it should "update an action with different language and check preserving 
params" in withAssetCleaner(wskprops) {
+    (wp, assetHelper) =>
+      val name = "updatedAction"
+
+      assetHelper.withCleaner(wsk.action, name, false) { (action, _) =>
+        wsk.action.create(
+          name,
+          Some(TestUtils.getTestActionFilename("hello.js")),
+          parameters = Map("name" -> testString.toJson)) //unused in the first 
function
+      }
+
+      val run1 = wsk.action.invoke(name, Map("payload" -> testString.toJson))
+      withActivation(wsk.activation, run1) { activation =>
+        activation.response.status shouldBe "success"
+        activation.logs.get.mkString(" ") should include(s"hello, $testString")
+      }
+
+      wsk.action.create(name, 
Some(TestUtils.getTestActionFilename("hello.py")), update = true)
+
+      val run2 = wsk.action.invoke(name)
+      withActivation(wsk.activation, run2) { activation =>
+        activation.response.status shouldBe "success"
+        activation.logs.get.mkString(" ") should include(s"Hello $testString")
+      }
 
 Review comment:
   Do we need to run these actions? Do we even need a system test for it? Feels 
like an API level test "just" updating the action and then checking that 
"parameters" remain unchanged is sufficient here, WDYT?

----------------------------------------------------------------
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