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:
[email protected]


With regards,
Apache Git Services

Reply via email to