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 2020/10/05 04:54:42 UTC

[GitHub] [openwhisk] style95 commented on a change in pull request #4989: Actions with require-whisk-auth annotation as boolean false are rejected by controller

style95 commented on a change in pull request #4989:
URL: https://github.com/apache/openwhisk/pull/4989#discussion_r499345395



##########
File path: tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskWebActionsTests.scala
##########
@@ -147,6 +147,25 @@ class WskWebActionsTests extends TestHelpers with WskTestHelpers with RestUtil w
       authorizedResponse.body.asString.parseJson.asJsObject.fields("__ow_user").convertTo[String] shouldBe namespace
   }
 
+  /**
+   * Tests web action not requiring authentication.
+   */
+  it should "create a web action not requiring authentication accessible via HTTPS" in withAssetCleaner(wskprops) {
+    (wp, assetHelper) =>
+      val name = "webaction"
+      val file = Some(TestUtils.getTestActionFilename("echo.js"))
+      val host = getServiceURL()
+      val url = s"$host$testRoutePath/$namespace/default/$name.json"
+
+      assetHelper.withCleaner(wsk.action, name) { (action, _) =>
+        action.create(name, file, web = Some("true"), annotations = Map("require-whisk-auth" -> false.toJson))
+      }
+
+      val unauthorizedResponse = RestAssured.given().config(sslconfig).get(url)
+      unauthorizedResponse.statusCode shouldBe 200
+      unauthorizedResponse.body.asString.parseJson.asJsObject.fields("__ow_user").convertTo[String] shouldBe namespace

Review comment:
       Seems the test complains about the absence of this field.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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