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

 ##########
 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:
   Perhaps we don't need to invoke it first time but we need it the second time 
in order to verify that the function can correctly consume the params even if 
it's a different runtime/language. This is more like end-to-end test.

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