From b609cbd1233a470f8411d0855acd8d62437d7ebc Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti Date: Mon, 3 Mar 2025 16:08:05 +0100 Subject: [PATCH] Fixing tests problems with swagger pet api and post call Signed-off-by: Francisco Javier Tirado Sarti --- impl/http/pom.xml | 5 +++++ .../impl/HTTPWorkflowDefinitionTest.java | 2 +- .../http/src/test/resources/callPostHttp.yaml | 19 ++++--------------- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/impl/http/pom.xml b/impl/http/pom.xml index fdf2a168..0df48fb3 100644 --- a/impl/http/pom.xml +++ b/impl/http/pom.xml @@ -41,5 +41,10 @@ assertj-core test + + ch.qos.logback + logback-classic + test + \ No newline at end of file diff --git a/impl/http/src/test/java/io/serverlessworkflow/impl/HTTPWorkflowDefinitionTest.java b/impl/http/src/test/java/io/serverlessworkflow/impl/HTTPWorkflowDefinitionTest.java index 7492be53..badb6403 100644 --- a/impl/http/src/test/java/io/serverlessworkflow/impl/HTTPWorkflowDefinitionTest.java +++ b/impl/http/src/test/java/io/serverlessworkflow/impl/HTTPWorkflowDefinitionTest.java @@ -98,7 +98,7 @@ private static Stream provideParameters() { "call-http-query-parameters-external-schema.yaml", starTrekInput, starTrekCondition), Arguments.of( "callPostHttp.yaml", - Map.of("name", "Javierito", "status", "available"), + Map.of("name", "Javierito", "surname", "Unknown"), new Condition<>(o -> o.equals("Javierito"), "CallHttpPostCondition"))); } } diff --git a/impl/http/src/test/resources/callPostHttp.yaml b/impl/http/src/test/resources/callPostHttp.yaml index d66dcfaa..f12fec42 100644 --- a/impl/http/src/test/resources/callPostHttp.yaml +++ b/impl/http/src/test/resources/callPostHttp.yaml @@ -9,20 +9,9 @@ do: with: method: post endpoint: - uri: https://petstore.swagger.io/v2/pet + uri: https://fakerestapi.azurewebsites.net/api/v1/Authors body: - name: ${.name} - status: ${.status} + firstName: ${.name} + lastName: ${.surname } output: - as: .id - - getPet: - call: http - with: - method: get - endpoint: - uri: https://petstore.swagger.io/v2/pet/{petId} - input: - from: - petId: ${.} - output: - as: .name \ No newline at end of file + as: .firstName \ No newline at end of file