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

 ##########
 File path: tests/src/test/scala/system/basic/WskActionTests.scala
 ##########
 @@ -183,13 +184,17 @@ class WskActionTests extends TestHelpers with 
WskTestHelpers with JsHelpers with
         JsObject("key" -> JsString("copiedParam2"), "value" -> JsNumber(123)),
         JsObject("key" -> JsString("origParam1"), "value" -> 
JsString("origParamValue1")),
         JsObject("key" -> JsString("origParam2"), "value" -> JsNumber(999)))
-      val resAnnots = Seq(
+      val baseAnnots = Seq(
         JsObject("key" -> JsString("origAnnot1"), "value" -> 
JsString("origAnnotValue1")),
         JsObject("key" -> JsString("copiedAnnot2"), "value" -> 
JsBoolean(false)),
         JsObject("key" -> JsString("copiedAnnot1"), "value" -> 
JsString("copiedAnnotValue1")),
         JsObject("key" -> JsString("origAnnot2"), "value" -> JsBoolean(true)),
         JsObject("key" -> JsString("exec"), "value" -> JsString("nodejs:6")),
         JsObject("key" -> WhiskAction.provideApiKeyAnnotationName.toJson, 
"value" -> JsBoolean(false)))
+      val resAnnots: Seq[JsObject] = if (FeatureFlags.requireApiKeyAnnotation) 
{
+        baseAnnots ++ Seq(
+          JsObject("key" -> WhiskAction.provideApiKeyAnnotationName.toJson, 
"value" -> JsBoolean(false)))
 
 Review comment:
   Use `JsTrue` instead of `JsBoolean(false)`

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


With regards,
Apache Git Services

Reply via email to