Skip to content

Commit

Permalink
Adjust test to updated test action. (ibm-functions#284)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
falkzoll authored Nov 22, 2023
1 parent 55805b8 commit 81d810c
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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/"

Expand Down Expand Up @@ -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")))
}

}
Expand Down

0 comments on commit 81d810c

Please sign in to comment.