From b6d643e9b5c29f563b67b9d7049ab975b9603ee1 Mon Sep 17 00:00:00 2001 From: Falk Zoll Date: Wed, 22 Nov 2023 09:37:06 +0100 Subject: [PATCH] Adjust test to updated test action. - The cloudant test action was updated to become more stable and to consolidate response values. The test case is now adapted to the simplified response. --- .../CredentialsIBMNodeJsActionCloudantTests.scala | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/src/test/scala/runtime/integration/CredentialsIBMNodeJsActionCloudantTests.scala b/tests/src/test/scala/runtime/integration/CredentialsIBMNodeJsActionCloudantTests.scala index fe367f5..46e9165 100644 --- a/tests/src/test/scala/runtime/integration/CredentialsIBMNodeJsActionCloudantTests.scala +++ b/tests/src/test/scala/runtime/integration/CredentialsIBMNodeJsActionCloudantTests.scala @@ -27,7 +27,7 @@ import scala.io.Source class CredentialsIBMNodeJsActionCloudantTests extends TestHelpers with WskTestHelpers with WskActorSystem { implicit val wskprops: WskProps = WskProps() - lazy val defaultKind = Some("nodejs:14") + lazy val defaultKind = Some("nodejs:20") val wsk = new WskRestOperations val datdir = "tests/dat/" @@ -57,12 +57,7 @@ class CredentialsIBMNodeJsActionCloudantTests extends TestHelpers with WskTestHe withActivation(wsk.activation, wsk.action.invoke("testCloudantAction")) { activation => val response = activation.response response.result.get.fields.get("error") shouldBe empty - if (defaultKind.getOrElse("") == "nodejs:16" || defaultKind.getOrElse("") == "nodejs:20") { - response.result.get.fields.get("result").get.asJsObject.fields.get("lastname") should be( - Some(JsString("Queue"))) - } else { - response.result.get.fields.get("lastname") should be(Some(JsString("Queue"))) - } + response.result.get.fields.get("lastname") should be(Some(JsString("Queue"))) } }