jessealva commented on a change in pull request #2966: WIP: Path parameter 
support for API GW
URL: 
https://github.com/apache/incubator-openwhisk/pull/2966#discussion_r162063594
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/ApiGwRestTests.scala
 ##########
 @@ -245,4 +248,48 @@ class ApiGwRestTests extends ApiGwTests {
     rr.stderr should include("A valid auth key is required")
   }
 
+  behavior of "Wsk rest api creation with path parameters with swagger"
+
+  it should "create the API when swagger file contains path parameters" in 
withAssetCleaner(wskprops) {
+    (wp, assetHelper) =>
+      println("**8****** apihost:")
+      println(wskprops.apihost)
+      val actionName = "cli_apigwtest_path_param_swagger_action"
+      var exception: Throwable = null
+      val apiName = "/guest/v1"
+      val reqPath = "\\$\\(request.path\\)"
+      val testRelPath = "/api2/greeting2/{name}"
+      val testRelPathGet = "/api2/greeting2/name"
+      val hostRegex = "%HOST%".r
+      val namespaceRegex = "%NAMESPACE%".r
+      var file = TestUtils.getTestActionFilename(s"echo-web-http.js")
+      assetHelper.withCleaner(wsk.action, actionName, confirmDelete = true) { 
(action, _) =>
+        action.create(actionName, Some(file), web = Some("true"))
+      }
+      try {
+        val apiGwURL = "https://"; + wskprops.apihost
 
 Review comment:
   So I opened up #3192  to address these issues.  It should pass right now 
without attempting to make the call to the ApiGW end point.  All these pieces 
can be addressed when the code is changed to be in the base class instead of 
the `Rest` class.  If I don't do this I don't think I'll get this out this 
month as I still have the CLI that needs integrating/testing.

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

Reply via email to