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 2019/03/28 07:38:53 UTC
[GitHub] [incubator-openwhisk] markusthoemmes commented on a change in pull
request #4387: Make tests working in case the "provide-api-key" feature is
disabled
markusthoemmes commented on a change in pull request #4387: Make tests working in case the "provide-api-key" feature is disabled
URL: https://github.com/apache/incubator-openwhisk/pull/4387#discussion_r269884118
##########
File path: tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala
##########
@@ -430,13 +433,49 @@ class WskRestBasicUsageTests extends TestHelpers with WskTestHelpers with WskAct
action.create(name, Some(TestUtils.getTestActionFilename("echo.js")), web = Some(flag.toLowerCase))
}
- val action = wsk.action.get(name)
- action.getFieldJsValue("annotations").convertTo[Set[JsObject]] shouldBe Set(
+ val expectedSet = Set(
JsObject("key" -> JsString("exec"), "value" -> JsString("nodejs:6")),
- JsObject("key" -> WhiskAction.provideApiKeyAnnotationName.toJson, "value" -> JsBoolean(false)),
JsObject("key" -> JsString("web-export"), "value" -> JsBoolean(webEnabled || rawEnabled)),
JsObject("key" -> JsString("raw-http"), "value" -> JsBoolean(rawEnabled)),
JsObject("key" -> JsString("final"), "value" -> JsBoolean(webEnabled || rawEnabled)))
+
+ val action = wsk.action.get(name)
+ action.getFieldJsValue("annotations").convertTo[Set[JsObject]] shouldBe (if (requireAPIKeyAnnotation) {
Review comment:
I wouldn't want to do that. We should instead use the proper `Parameters` type I think.
----------------------------------------------------------------
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
With regards,
Apache Git Services