You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/06/26 15:59:50 UTC
[incubator-openwhisk-cli] 10/36: Add python:3 action support.
This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
commit d0b6dd658d6729170138632bc2e56392cd5dd228
Author: cclauss <cc...@bluewin.ch>
AuthorDate: Fri Feb 24 10:45:12 2017 +0100
Add python:3 action support.
Update tests to work in both Python 2 and Python 3.
Rename pythonaction to python3action for container image name for clarity.
Add tests for python:2 and python:3.
Add image names for all the actions. Rename javaaction to java8action for consistency.
---
tests/src/test/scala/system/basic/CLIPythonTests.scala | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/tests/src/test/scala/system/basic/CLIPythonTests.scala b/tests/src/test/scala/system/basic/CLIPythonTests.scala
index ff7ea82..80c5678 100644
--- a/tests/src/test/scala/system/basic/CLIPythonTests.scala
+++ b/tests/src/test/scala/system/basic/CLIPythonTests.scala
@@ -68,7 +68,7 @@ class CLIPythonTests
(wp, assetHelper) =>
val name = "pythonZipWithNonDefaultEntryPoint"
assetHelper.withCleaner(wsk.action, name) {
- (action, _) => action.create(name, Some(TestUtils.getTestActionFilename("python.zip")), main = Some("niam"), kind = Some("python"))
+ (action, _) => action.create(name, Some(TestUtils.getTestActionFilename("python.zip")), main = Some("niam"), kind = Some("python:default"))
}
withActivation(wsk.activation, wsk.action.invoke(name, Map("name" -> "Prince".toJson))) {
@@ -76,6 +76,20 @@ class CLIPythonTests
}
}
+ Seq("python:2", "python:3").foreach { kind =>
+ it should s"invoke a $kind action" in withAssetCleaner(wskprops) {
+ (wp, assetHelper) =>
+ val name = s"${kind.replace(":", "")}-action"
+ assetHelper.withCleaner(wsk.action, name) {
+ (action, _) => action.create(name, Some(TestUtils.getTestActionFilename("pythonVersion.py")), kind = Some(kind))
+ }
+
+ withActivation(wsk.activation, wsk.action.invoke(name)) {
+ _.response.result.get shouldBe JsObject("version" -> JsNumber(kind.takeRight(1).toInt))
+ }
+ }
+ }
+
it should "invoke an action and confirm expected environment is defined" in withAssetCleaner(wskprops) {
(wp, assetHelper) =>
val name = "stdenv"
--
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.