You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/06/29 17:21:03 UTC

[GitHub] dubeejw commented on a change in pull request #2444: Display CORS Headers for Non-Options Requests

dubeejw commented on a change in pull request #2444: Display CORS Headers for Non-Options Requests
URL: https://github.com/apache/incubator-openwhisk/pull/2444#discussion_r124857386
 
 

 ##########
 File path: tests/src/test/scala/whisk/core/cli/test/WskWebActionsTests.scala
 ##########
 @@ -230,6 +230,25 @@ trait WskWebActionsTests
             response.header("Access-Control-Allow-Headers") shouldBe "Headers set from Web Action"
     }
 
+    it should "ensure that CORS header is preserved for non-custom options" in withAssetCleaner(wskprops) {
+        (wp, assetHelper) =>
+            val name = "webaction"
+            val file = Some(TestUtils.getTestActionFilename("corsHeaderMod.js"))
+
+            assetHelper.withCleaner(wsk.action, name) {
+                (action, _) =>
+                    action.create(name, file, web = Some("true"))
+            }
+
+            val host = getServiceURL()
+            val url = host + s"$testRoutePath/$namespace/default/webaction.http"
 
 Review comment:
   Here I'm just doing an integration test for an options route without the web-custom-options annotation enabled. Added another test for `.json` below. Can combined the two tesets.
 
----------------------------------------------------------------
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