rabbah commented on a change in pull request #3950: Extend system testsuite
URL:
https://github.com/apache/incubator-openwhisk/pull/3950#discussion_r227867194
##########
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:
`run2` could just be `run`? minor point.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services