You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ra...@apache.org on 2019/01/26 18:39:36 UTC
[incubator-openwhisk-cli] branch master updated: include test from
incubator-openwhisk PR#2941 (#365)
This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
The following commit(s) were added to refs/heads/master by this push:
new e80f083 include test from incubator-openwhisk PR#2941 (#365)
e80f083 is described below
commit e80f08349eb812831a488d5b4e46d8d0c565e8c6
Author: David Cariello <dr...@us.ibm.com>
AuthorDate: Sat Jan 26 12:39:32 2019 -0600
include test from incubator-openwhisk PR#2941 (#365)
---
.../core/cli/test/ApiGwCliBasicTests.scala | 33 ++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwCliBasicTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwCliBasicTests.scala
index 839bc0a..ea08716 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwCliBasicTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/ApiGwCliBasicTests.scala
@@ -1029,4 +1029,37 @@ abstract class ApiGwCliBasicTests extends BaseApiGwTests {
apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
}
}
+
+ it should "verify get API name that uses custom package" in {
+ val testName = "CLI_APIGWTEST25"
+ val testbasepath = "/" + testName + "_bp"
+ val testrelpath = "/path"
+ val testnewrelpath = "/path_new"
+ val testurlop = "get"
+ val testapiname = testName + " API Name"
+ val packageName = withTimestamp("pkg")
+ val actionName = packageName + "/" + testName + "_action"
+ try {
+ wsk.pkg.create(packageName).stdout should include regex (s"""ok: created package $packageName""")
+
+ // Create the action for the API. It must be a "web-action" action.
+ val file = TestUtils.getTestActionFilename(s"echo.js")
+ wsk.action.create(name = actionName, artifact = Some(file), expectedExitCode = createCode, web = Some("true"))
+
+ var rr = apiCreate(
+ basepath = Some(testbasepath),
+ relpath = Some(testrelpath),
+ operation = Some(testurlop),
+ action = Some(actionName),
+ apiname = Some(testapiname))
+ verifyApiCreated(rr)
+
+ rr = apiGet(basepathOrApiName = Some(testapiname))
+ verifyApiNameGet(rr, testbasepath, actionName)
+ } finally {
+ wsk.action.delete(name = actionName, expectedExitCode = DONTCARE_EXIT)
+ apiDelete(basepathOrApiName = testbasepath, expectedExitCode = DONTCARE_EXIT)
+ wsk.pkg.delete(packageName).stdout should include regex (s"""ok: deleted package $packageName""")
+ }
+ }
}