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/11 05:41:09 UTC

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

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

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/ApiGwRestBasicTests.scala
 ##########
 @@ -899,4 +900,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 = "pkg_" + UUID.randomUUID()
+    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:
   this could use the `withAssetCleaner` helper which will delete the action on its own at the end of the 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:
users@infra.apache.org


With regards,
Apache Git Services