You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/12 21:28:06 UTC

[GitHub] mdeuser commented on a change in pull request #2941: Add api gateway test that uses custom package for action

mdeuser commented on a change in pull request #2941: Add api gateway test that uses custom package for action
URL: https://github.com/apache/incubator-openwhisk/pull/2941#discussion_r194894738
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala
 ##########
 @@ -899,4 +899,37 @@ abstract class ApiGwRestBasicTests 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""""name":\\s*"$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 = 200, web = Some("true"))
 
 Review comment:
   successful expected exit code is the default an does not need to be explicitly stated; otherwise use the `SUCCESS_EXIT` constant.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services