This is an automated email from the ASF dual-hosted git repository.
slange pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 3523d41 Transform array to set before comparison to make test robust
(#4423)
3523d41 is described below
commit 3523d41a66c11ae00b4b9c0f6b829f3700b60e9c
Author: Martin Henke <[email protected]>
AuthorDate: Wed Apr 3 09:13:44 2019 +0200
Transform array to set before comparison to make test robust (#4423)
---
.../openwhisk/core/cli/test/WskRestBasicUsageTests.scala | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git
a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala
b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala
index 7d65a6d..ac4b1c4 100644
---
a/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala
+++
b/tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskRestBasicUsageTests.scala
@@ -434,15 +434,16 @@ class WskRestBasicUsageTests extends TestHelpers with
WskTestHelpers with WskAct
val action = wsk.action.get(name)
- val baseAnnotations = Parameters("exec", "nodejs:6") ++
- Parameters("web-export", JsBoolean(webEnabled || rawEnabled)) ++
+ val baseAnnotations = Parameters("web-export", JsBoolean(webEnabled ||
rawEnabled)) ++
Parameters("raw-http", JsBoolean(rawEnabled)) ++
- Parameters("final", JsBoolean(webEnabled || rawEnabled))
+ Parameters("final", JsBoolean(webEnabled || rawEnabled)) ++
+ Parameters("exec", "nodejs:6")
val testAnnotations = if (requireAPIKeyAnnotation) {
baseAnnotations ++ Parameters(WhiskAction.provideApiKeyAnnotationName,
JsFalse)
} else baseAnnotations
- action.getFieldJsValue("annotations") shouldBe testAnnotations.toJsArray
+ action.getFieldJsValue("annotations").convertTo[Set[JsObject]] shouldBe
testAnnotations.toJsArray
+ .convertTo[Set[JsObject]]
}
}
@@ -470,7 +471,8 @@ class WskRestBasicUsageTests extends TestHelpers with
WskTestHelpers with WskAct
}
val action = wsk.action.get(name)
- action.getFieldJsValue("annotations") shouldBe testAnnotations.toJsArray
+ action.getFieldJsValue("annotations").convertTo[Set[JsObject]] shouldBe
testAnnotations.toJsArray
+ .convertTo[Set[JsObject]]
}
it should "invoke action while not encoding &, <, > characters" in
withAssetCleaner(wskprops) { (wp, assetHelper) =>