From b41be6e02e9388894e994a90ff57169d2c08e32c Mon Sep 17 00:00:00 2001 From: Christoph Deppisch Date: Fri, 20 Oct 2023 11:19:21 +0200 Subject: [PATCH] chore(deps): Update to Citrus 4.0 - Java 17 - Apache Camel 4.1.0 - ActiveMQ Artemis 2.31.0 - ActiveMQ 5.18.2 - Cucumber 7.14.0 - Knative Client 6.9.0 - Kubernetes Client 6.9.0 - Netty 4.1.100.Final - SLF4J 2.0.9 - SnakeYAML 2.2 - Spring Framework 6.0.13 - Testcontainers 1.19.1 - PostrgeSQL 42.6.0 --- .github/workflows/build.yml | 4 +- .github/workflows/nightly.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/snapshot.yml | 2 +- examples/extension/steps/pom.xml | 8 +- .../com/company/steps/custom/CustomSteps.java | 6 +- examples/logging/yaks-config.yaml | 2 +- examples/logging/yaks.properties | 2 +- examples/openapi/fruitstore-server.groovy | 18 +-- examples/selenium/web-server.groovy | 18 +-- java/docs/steps-jdbc.adoc | 4 +- java/docs/steps-jms.adoc | 2 +- java/pom.xml | 129 +++++++++--------- java/runtime/yaks-runtime-core/pom.xml | 12 +- .../yaks/config/YaksAutoConfiguration.java | 8 +- java/runtime/yaks-runtime-maven/pom.xml | 8 +- .../citrusframework/yaks/groovy/Yaks_IT.java | 10 +- .../org/citrusframework/yaks/xml/Yaks_IT.java | 10 +- .../citrusframework/yaks/yaml/Yaks_IT.java | 10 +- .../src/test/resources/cucumber.properties | 2 +- java/steps/yaks-camel-k/pom.xml | 6 +- .../yaks/camelk/CamelKSettings.java | 22 --- .../yaks/camelk/CamelKSteps.java | 26 ++-- .../yaks/camelk/KameletSteps.java | 27 ++-- .../camelk/actions/AbstractCamelKAction.java | 6 +- .../yaks/camelk/actions/CamelKAction.java | 4 +- .../camelk/actions/CamelKActionBuilder.java | 2 +- .../integration/CreateIntegrationAction.java | 8 +- .../integration/DeleteIntegrationAction.java | 4 +- .../integration/VerifyIntegrationAction.java | 6 +- .../kamelet/AbstractKameletAction.java | 2 +- .../actions/kamelet/CreateKameletAction.java | 8 +- .../actions/kamelet/CreatePipeAction.java | 8 +- .../actions/kamelet/DeleteKameletAction.java | 2 +- .../actions/kamelet/DeletePipeAction.java | 4 +- .../actions/kamelet/VerifyKameletAction.java | 4 +- .../actions/kamelet/VerifyPipeAction.java | 4 +- .../yaks/camelk/jbang/CamelJBang.java | 4 +- .../yaks/camelk/jbang/CamelJBangSettings.java | 2 +- .../yaks/camelk/jbang/ProcessAndOutput.java | 2 +- .../yaks/camelk/CamelKFeature_IT.java | 2 +- .../yaks/camelk/CamelKTestSteps.java | 4 +- .../yaks/camelk/IntegrationBuilderTest.java | 8 +- .../yaks/camelk/KameletBuilderTest.java | 8 +- .../yaks/camelk/PipeBuilderTest.java | 10 +- .../CreateIntegrationActionTest.java | 4 +- .../DeleteIntegrationActionTest.java | 6 +- .../VerifyIntegrationActionTest.java | 8 +- .../actions/kamelet/CreatePipeActionTest.java | 12 +- .../actions/kamelet/DeletePipeActionTest.java | 4 +- .../actions/kamelet/VerifyPipeActionTest.java | 4 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-camel/pom.xml | 10 +- .../yaks/camel/CamelReferenceResolver.java | 6 +- .../yaks/camel/CamelSteps.java | 117 ++++++++-------- .../yaks/camel/CamelFeature_IT.java | 2 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-groovy/pom.xml | 20 +-- .../yaks/groovy/GroovyScript.java | 4 +- .../yaks/groovy/GroovyScriptSteps.java | 28 ++-- .../yaks/groovy/GroovyShellUtils.java | 4 +- .../yaks/groovy/dsl/CitrusConfiguration.java | 2 +- .../yaks/groovy/dsl/ConfigurationScript.java | 2 +- .../groovy/dsl/EndpointsConfiguration.java | 6 +- .../yaks/groovy/dsl/QueueConfiguration.java | 4 +- .../yaks/groovy/dsl/actions/ActionScript.java | 6 +- .../yaks/groovy/dsl/actions/Actions.java | 34 ++--- .../dsl/actions/ActionsConfiguration.java | 14 +- .../groovy/dsl/beans/BeansConfiguration.java | 4 +- .../EndpointBuilderConfiguration.java | 4 +- .../dsl/endpoints/EndpointBuilderHelper.java | 4 +- .../dsl/endpoints/EndpointConfiguration.java | 6 +- .../org/citrusframework/yaks/groovy/Foo.java | 2 +- .../yaks/groovy/GroovyFeature_IT.java | 2 +- .../yaks/groovy/GroovyTestSteps.java | 4 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-http/pom.xml | 10 +- .../yaks/http/HttpClientSteps.java | 59 ++++---- .../yaks/http/HttpServerSteps.java | 45 +++--- .../citrusframework/yaks/http/HttpSteps.java | 6 +- .../function/ResolveServiceUrlFunction.java | 8 +- .../yaks/http/HttpEndpointConfiguration.java | 26 ++-- .../yaks/http/HttpFeature_IT.java | 2 +- .../ResolveServiceUrlFunctionTest.java | 10 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-jdbc/pom.xml | 10 +- .../citrusframework/yaks/jdbc/JdbcSteps.java | 22 +-- .../yaks/jdbc/JdbcFeature_IT.java | 2 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- .../citrusframework/yaks/jdbc/jdbc.feature | 8 +- .../src/test/resources/test-db-init.sql | 2 +- java/steps/yaks-jms/pom.xml | 18 +-- .../citrusframework/yaks/jms/JmsSteps.java | 27 ++-- .../connection/ConnectionFactoryCreator.java | 2 +- .../DefaultConnectionFactoryCreator.java | 4 +- .../ActiveMQConnectionFactoryCreator.java | 2 +- ...tiveMQArtemisConnectionFactoryCreator.java | 26 +--- .../yaks/jms/JmsBrokerConfiguration.java | 42 ++++-- .../yaks/jms/JmsFeature_IT.java | 2 +- .../ConnectionFactoryCreatorTest.java | 21 +-- .../DefaultConnectionFactoryCreatorTest.java | 46 +++++-- .../ActiveMQConnectionFactoryCreatorTest.java | 44 ++++-- .../yaks-jms/src/test/resources/broker.xml | 40 ++++++ .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- .../yaks/jms/jms-multiline.feature | 4 +- .../org/citrusframework/yaks/jms/jms.feature | 4 +- java/steps/yaks-kafka/pom.xml | 12 +- .../yaks/kafka/KafkaSteps.java | 28 ++-- .../kafka/EmbeddedKafkaConfiguration.java | 4 +- .../yaks/kafka/KafkaFeature_IT.java | 2 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-knative/pom.xml | 15 +- .../yaks/knative/KnativeEventingSteps.java | 14 +- .../yaks/knative/KnativeMessagingSteps.java | 10 +- .../yaks/knative/KnativeSteps.java | 10 +- .../yaks/knative/KnativeSupport.java | 2 +- .../yaks/knative/ReceiveEventSteps.java | 12 +- .../yaks/knative/SendEventSteps.java | 42 +++--- .../actions/AbstractKnativeAction.java | 4 +- .../actions/DeleteKnativeResourceAction.java | 2 +- .../yaks/knative/actions/KnativeAction.java | 4 +- .../knative/actions/KnativeActionBuilder.java | 2 +- .../actions/eventing/CreateBrokerAction.java | 2 +- .../actions/eventing/CreateTriggerAction.java | 2 +- .../actions/eventing/VerifyBrokerAction.java | 4 +- .../messaging/CreateChannelAction.java | 2 +- .../messaging/CreateSubscriptionAction.java | 2 +- .../yaks/knative/ce/CloudEventMessage.java | 2 +- .../yaks/knative/ce/CloudEventSupport.java | 4 +- .../yaks/knative/KnativeFeature_IT.java | 2 +- .../knative/KnativeServiceConfiguration.java | 28 ++-- .../yaks/knative/KnativeTestSteps.java | 16 +-- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-kubernetes/pom.xml | 8 +- .../yaks/kubernetes/KubernetesActor.java | 2 +- .../yaks/kubernetes/KubernetesSteps.java | 26 ++-- .../yaks/kubernetes/KubernetesSupport.java | 31 ++--- .../actions/AbstractKubernetesAction.java | 4 +- .../actions/CreateAnnotationsAction.java | 4 +- .../actions/CreateCustomResourceAction.java | 4 +- .../actions/CreateLabelsAction.java | 4 +- .../actions/CreateResourceAction.java | 2 +- .../actions/CreateSecretAction.java | 13 +- .../actions/CreateServiceAction.java | 2 +- .../actions/DeleteCustomResourceAction.java | 2 +- .../actions/DeleteResourceAction.java | 2 +- .../actions/DeleteSecretAction.java | 2 +- .../actions/DeleteServiceAction.java | 2 +- .../kubernetes/actions/KubernetesAction.java | 4 +- .../actions/KubernetesActionBuilder.java | 2 +- .../actions/VerifyCustomResourceAction.java | 9 +- .../kubernetes/actions/VerifyPodAction.java | 6 +- .../actions/WatchPodLogsAction.java | 4 +- .../functions/ServiceClusterIpFunction.java | 8 +- .../yaks/kubernetes/KubernetesFeature_IT.java | 2 +- .../KubernetesServiceConfiguration.java | 5 - .../yaks/kubernetes/KubernetesTestSteps.java | 12 +- .../ServiceClusterIpFunctionTest.java | 8 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-openapi/pom.xml | 10 +- .../yaks/openapi/OpenApiClientSteps.java | 14 +- .../yaks/openapi/OpenApiResourceLoader.java | 22 ++- .../yaks/openapi/OpenApiServerSteps.java | 14 +- .../yaks/openapi/OpenApiSteps.java | 10 +- .../yaks/openapi/OpenApiSupport.java | 76 +++++++++++ .../openapi/OpenApiTestDataGenerator.java | 4 +- .../yaks/openapi/OpenApiFeature_IT.java | 2 +- .../yaks/openapi/PetstoreConfiguration.java | 26 ++-- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-selenium/pom.xml | 8 +- .../yaks/selenium/SeleniumSteps.java | 29 ++-- .../yaks/selenium/SeleniumFeature_IT.java | 2 +- .../yaks/selenium/SeleniumStepsTest.java | 34 ++--- .../yaks/selenium/WebServerConfiguration.java | 40 +++--- .../yaks/selenium/page/UserFormPage.java | 8 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-standard/pom.xml | 12 +- .../citrusframework/yaks/YaksSettings.java | 2 +- .../yaks/hooks/InjectEnvVarsHook.java | 8 +- .../yaks/hooks/TestFailureHook.java | 10 +- .../yaks/message/MessageCreator.java | 2 +- .../yaks/message/MessageCreators.java | 14 +- .../yaks/report/SystemOutTestReporter.java | 10 +- .../yaks/report/TestReporter.java | 2 +- .../yaks/standard/ComponentSteps.java | 6 +- .../yaks/standard/EndpointSteps.java | 20 +-- .../yaks/standard/MessagingSteps.java | 18 +-- .../yaks/standard/StandardSteps.java | 14 +- .../yaks/hooks/InjectEnvVarsHookTest.java | 10 +- .../yaks/message/BarMessageCreator.java | 4 +- .../yaks/message/PojoMessageCreator.java | 4 +- .../yaks/standard/EndpointConfiguration.java | 10 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/steps/yaks-testcontainers/pom.xml | 6 +- .../DatabaseContainerSteps.java | 8 +- .../yaks/testcontainers/KafkaSettings.java | 2 +- .../yaks/testcontainers/KafkaSteps.java | 12 +- .../testcontainers/LocalStackSettings.java | 2 +- .../yaks/testcontainers/LocalStackSteps.java | 12 +- .../yaks/testcontainers/MongoDBSteps.java | 12 +- .../yaks/testcontainers/PostgreSQLSteps.java | 14 +- .../yaks/testcontainers/RedpandaSettings.java | 2 +- .../yaks/testcontainers/RedpandaSteps.java | 12 +- .../testcontainers/TestContainersSteps.java | 8 +- .../testcontainers/aws2/AWS2Container.java | 2 +- .../TestContainersFeature_IT.java | 2 +- .../src/test/resources/cucumber.properties | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- .../src/test/resources/log4j2-test.xml | 2 +- java/tools/yaks-jbang/pom.xml | 14 +- .../yaks/jbang/commands/Init.java | 5 +- .../yaks/jbang/commands/ListTests.java | 2 +- .../yaks/jbang/commands/Run.java | 12 +- .../src/main/resources/cucumber.properties | 2 +- 226 files changed, 1210 insertions(+), 1070 deletions(-) create mode 100644 java/steps/yaks-jms/src/test/resources/broker.xml create mode 100644 java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSupport.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e754f46d..915aa45f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Install Go uses: actions/setup-go@v4 @@ -78,7 +78,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Install Go uses: actions/setup-go@v4 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index edce76de..e9fd3f34 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -31,7 +31,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Install Go uses: actions/setup-go@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 57a62a1e..856f980a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Install Go uses: actions/setup-go@v4 diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index bf49495f..7d4211a9 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -32,7 +32,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - name: Install Go uses: actions/setup-go@v4 diff --git a/examples/extension/steps/pom.xml b/examples/extension/steps/pom.xml index cdee11c6..28180687 100644 --- a/examples/extension/steps/pom.xml +++ b/examples/extension/steps/pom.xml @@ -24,8 +24,8 @@ 1.0.0-SNAPSHOT - 3.4.0 - 7.11.0 + 4.0.0 + 7.14.0 @@ -36,12 +36,12 @@ - com.consol.citrus + org.citrusframework citrus-core ${citrus.version} - com.consol.citrus + org.citrusframework citrus-cucumber ${citrus.version} diff --git a/examples/extension/steps/src/main/java/com/company/steps/custom/CustomSteps.java b/examples/extension/steps/src/main/java/com/company/steps/custom/CustomSteps.java index 862b7cc7..46b88728 100644 --- a/examples/extension/steps/src/main/java/com/company/steps/custom/CustomSteps.java +++ b/examples/extension/steps/src/main/java/com/company/steps/custom/CustomSteps.java @@ -17,11 +17,11 @@ package com.company.steps.custom; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusResource; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusResource; import io.cucumber.java.en.Then; -import static com.consol.citrus.actions.EchoAction.Builder.echo; +import static org.citrusframework.actions.EchoAction.Builder.echo; public class CustomSteps { diff --git a/examples/logging/yaks-config.yaml b/examples/logging/yaks-config.yaml index cf0dba1b..b6a8ce12 100644 --- a/examples/logging/yaks-config.yaml +++ b/examples/logging/yaks-config.yaml @@ -23,7 +23,7 @@ config: level: INFO - name: org.citrusframework.yaks level: DEBUG - - name: com.consol.citrus + - name: org.citrusframework level: INFO - name: Logger.Message_IN level: DEBUG diff --git a/examples/logging/yaks.properties b/examples/logging/yaks.properties index 0be4c8bc..372d2005 100644 --- a/examples/logging/yaks.properties +++ b/examples/logging/yaks.properties @@ -15,4 +15,4 @@ # limitations under the License. # logging.level.org.citrusframework.yaks=DEBUG -logging.level.com.consol.citrus=DEBUG +logging.level.org.citrusframework=DEBUG diff --git a/examples/openapi/fruitstore-server.groovy b/examples/openapi/fruitstore-server.groovy index 5a43266f..9b224221 100644 --- a/examples/openapi/fruitstore-server.groovy +++ b/examples/openapi/fruitstore-server.groovy @@ -15,15 +15,15 @@ * limitations under the License. */ -import com.consol.citrus.endpoint.EndpointAdapter -import com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter -import com.consol.citrus.endpoint.adapter.mapping.HeaderMappingKeyExtractor -import com.consol.citrus.endpoint.adapter.mapping.SimpleMappingStrategy -import com.consol.citrus.http.message.HttpMessage -import com.consol.citrus.http.message.HttpMessageHeaders -import com.consol.citrus.message.Message -import com.consol.citrus.util.FileUtils +import org.citrusframework.endpoint.EndpointAdapter +import org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter +import org.citrusframework.endpoint.adapter.mapping.HeaderMappingKeyExtractor +import org.citrusframework.endpoint.adapter.mapping.SimpleMappingStrategy +import org.citrusframework.http.message.HttpMessage +import org.citrusframework.http.message.HttpMessageHeaders +import org.citrusframework.message.Message +import org.citrusframework.util.FileUtils import org.springframework.http.HttpMethod import org.springframework.http.HttpStatus diff --git a/examples/selenium/web-server.groovy b/examples/selenium/web-server.groovy index ba838919..ce51a43c 100644 --- a/examples/selenium/web-server.groovy +++ b/examples/selenium/web-server.groovy @@ -16,15 +16,15 @@ */ -import com.consol.citrus.endpoint.EndpointAdapter -import com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter -import com.consol.citrus.endpoint.adapter.mapping.HeaderMappingKeyExtractor -import com.consol.citrus.endpoint.adapter.mapping.SimpleMappingStrategy -import com.consol.citrus.http.message.HttpMessage -import com.consol.citrus.http.message.HttpMessageHeaders -import com.consol.citrus.message.Message -import com.consol.citrus.util.FileUtils +import org.citrusframework.endpoint.EndpointAdapter +import org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter +import org.citrusframework.endpoint.adapter.mapping.HeaderMappingKeyExtractor +import org.citrusframework.endpoint.adapter.mapping.SimpleMappingStrategy +import org.citrusframework.http.message.HttpMessage +import org.citrusframework.http.message.HttpMessageHeaders +import org.citrusframework.message.Message +import org.citrusframework.util.FileUtils import org.springframework.http.HttpStatus import org.springframework.http.MediaType import org.springframework.core.io.ClassPathResource diff --git a/java/docs/steps-jdbc.adoc b/java/docs/steps-jdbc.adoc index 860467d2..70d6a5be 100644 --- a/java/docs/steps-jdbc.adoc +++ b/java/docs/steps-jdbc.adoc @@ -147,7 +147,7 @@ The data table is able to verify a matrix of rows and columns. Each column can h Given SQL query: SELECT ID, TASK, COMPLETED FROM todo ORDER BY id Then verify columns | ID | 1 | 2 | 3 | 4 | @ignore@ | -| TASK | Learn some CamelK! | Get some milk | Do laundry | Wash the dog | Test CamelK with YAKS! | +| TASK | Learn some Camel K! | Get some milk | Do laundry | Wash the dog | Test CamelK with YAKS! | | COMPLETED | 0 | 0 | 0 | 0 | 0 | ---- @@ -172,6 +172,6 @@ Given SQL query: SELECT TASK FROM todo Then verify result set """ assert rows.size == 1 -assert rows[0].TASK == 'Learn some CamelK!' +assert rows[0].TASK == 'Learn some Camel K!' """ ---- diff --git a/java/docs/steps-jms.adoc b/java/docs/steps-jms.adoc index d7a84bd1..e6639c70 100644 --- a/java/docs/steps-jms.adoc +++ b/java/docs/steps-jms.adoc @@ -25,7 +25,7 @@ The configuration step receives a data table that defines the connection setting [source,gherkin] ---- Given JMS connection factory -| type | org.apache.activemq.ActiveMQConnectionFactory | +| type | org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory | | brokerUrl | tcp://localhost:61616 | | username | ${activemq.user} | | password | ${activemq.password} | diff --git a/java/pom.xml b/java/pom.xml index 63d81db7..9e3fde91 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -85,49 +85,49 @@ UTF-8 - 11 - 11 - 11 + 17 + 17 + 17 ${project.version} - 3.20.4 - 2.17.0 - 5.17.0 - 1.1.2 + 4.1.0 + 2.31.0 + 5.18.2 + 1.1.27 1.8.0 3.24.2 4.2.0 - 2.20.17 - 3.4.0 - 2.9.0 - 7.11.0 - 3.0.14 - 2.14.1 + 2.21.2 + 4.0.0 + 2.10.0 + 7.14.0 + 3.0.19 + 2.15.3 4.13.2 - 6.1.1 - 6.4.0 - 2.19.0 - 4.11.0 - 4.1.87.Final - 4.10.0 - 4.7.0 - 2.1.0 - 42.5.1 - 1.7.36 - 1.33 - 5.3.25 - 1.17.6 - - 2.1.0 + 6.9.0 + 6.9.0 + 2.21.0 + 5.6.0 + 4.1.100.Final + 4.12.0 + 4.7.5 + 2.1.1 + 42.6.0 + 2.0.9 + 2.2 + 6.0.13 + 1.19.1 + + 2.2.4 1.5.3 - 3.0.0 + 3.1.0 0.3.1 3.0.0 7.6.1 3.10.1 2.22.2 1.5 - 1.9.5 + 1.11.2 2.22.2 1.6.13 2.7 @@ -154,18 +154,6 @@ knative-client ${knative-client.version} - - io.fabric8 - knative-mock - ${knative-client.version} - - - org.junit.jupiter - junit-jupiter-engine - - - test - com.squareup.okhttp3 @@ -180,102 +168,102 @@ - com.consol.citrus + org.citrusframework citrus-base ${citrus.version} - com.consol.citrus + org.citrusframework citrus-main ${citrus.version} - com.consol.citrus + org.citrusframework citrus-junit ${citrus.version} - com.consol.citrus + org.citrusframework citrus-spring ${citrus.version} - com.consol.citrus + org.citrusframework citrus-groovy ${citrus.version} - com.consol.citrus + org.citrusframework citrus-xml ${citrus.version} - com.consol.citrus + org.citrusframework citrus-yaml ${citrus.version} - com.consol.citrus + org.citrusframework citrus-validation-json ${citrus.version} - com.consol.citrus + org.citrusframework citrus-validation-text ${citrus.version} - com.consol.citrus + org.citrusframework citrus-validation-groovy ${citrus.version} - com.consol.citrus + org.citrusframework citrus-validation-hamcrest ${citrus.version} - com.consol.citrus + org.citrusframework citrus-http ${citrus.version} - com.consol.citrus + org.citrusframework citrus-cucumber ${citrus.version} - com.consol.citrus + org.citrusframework citrus-camel ${citrus.version} - com.consol.citrus + org.citrusframework citrus-jms ${citrus.version} - com.consol.citrus + org.citrusframework citrus-kafka ${citrus.version} - com.consol.citrus + org.citrusframework citrus-mail ${citrus.version} - com.consol.citrus + org.citrusframework citrus-ws ${citrus.version} - com.consol.citrus + org.citrusframework citrus-selenium ${citrus.version} - com.consol.citrus + org.citrusframework citrus-sql ${citrus.version} @@ -322,20 +310,20 @@ org.apache.activemq - activemq-client + activemq-client-jakarta ${activemq.version} provided org.apache.activemq - artemis-jms-client + artemis-jakarta-client ${activemq.artemis.version} provided org.apache.activemq - activemq-broker - ${activemq.version} + artemis-jakarta-server + ${activemq.artemis.version} test @@ -526,6 +514,11 @@ slf4j-api ${slf4j.version} + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + org.apache.logging.log4j log4j-core @@ -533,7 +526,7 @@ org.apache.logging.log4j - log4j-slf4j-impl + log4j-slf4j2-impl ${log4j2.version} @@ -579,7 +572,7 @@ org.apache.logging.log4j - log4j-slf4j-impl + log4j-slf4j2-impl test diff --git a/java/runtime/yaks-runtime-core/pom.xml b/java/runtime/yaks-runtime-core/pom.xml index 9e2f75bf..e8feead1 100644 --- a/java/runtime/yaks-runtime-core/pom.xml +++ b/java/runtime/yaks-runtime-core/pom.xml @@ -108,19 +108,19 @@ - com.consol.citrus + org.citrusframework citrus-spring - com.consol.citrus + org.citrusframework citrus-groovy - com.consol.citrus + org.citrusframework citrus-xml - com.consol.citrus + org.citrusframework citrus-yaml @@ -130,11 +130,11 @@ - com.consol.citrus + org.citrusframework citrus-validation-json - com.consol.citrus + org.citrusframework citrus-validation-text diff --git a/java/runtime/yaks-runtime-core/src/main/java/org/citrusframework/yaks/config/YaksAutoConfiguration.java b/java/runtime/yaks-runtime-core/src/main/java/org/citrusframework/yaks/config/YaksAutoConfiguration.java index 23cc2bdf..2ba222a1 100644 --- a/java/runtime/yaks-runtime-core/src/main/java/org/citrusframework/yaks/config/YaksAutoConfiguration.java +++ b/java/runtime/yaks-runtime-core/src/main/java/org/citrusframework/yaks/config/YaksAutoConfiguration.java @@ -21,10 +21,10 @@ import java.net.URL; import java.util.stream.Stream; -import com.consol.citrus.functions.DefaultFunctionLibrary; -import com.consol.citrus.functions.FunctionLibrary; -import com.consol.citrus.variable.GlobalVariables; -import com.consol.citrus.variable.GlobalVariablesPropertyLoader; +import org.citrusframework.functions.DefaultFunctionLibrary; +import org.citrusframework.functions.FunctionLibrary; +import org.citrusframework.variable.GlobalVariables; +import org.citrusframework.variable.GlobalVariablesPropertyLoader; import org.citrusframework.yaks.report.SystemOutTestReporter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/java/runtime/yaks-runtime-maven/pom.xml b/java/runtime/yaks-runtime-maven/pom.xml index c9575e28..3143f56d 100644 --- a/java/runtime/yaks-runtime-maven/pom.xml +++ b/java/runtime/yaks-runtime-maven/pom.xml @@ -46,6 +46,12 @@ ${project.version} + + + org.apache.logging.log4j + log4j-slf4j2-impl + + @@ -53,7 +59,7 @@ - com.consol.citrus + org.citrusframework citrus-junit diff --git a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/groovy/Yaks_IT.java b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/groovy/Yaks_IT.java index db235142..2a25defe 100644 --- a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/groovy/Yaks_IT.java +++ b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/groovy/Yaks_IT.java @@ -23,11 +23,11 @@ import java.nio.file.StandardOpenOption; import java.util.UUID; -import com.consol.citrus.annotations.CitrusTestSource; -import com.consol.citrus.common.TestLoader; -import com.consol.citrus.junit.spring.JUnit4CitrusSpringSupport; -import com.consol.citrus.report.TestReporter; -import com.consol.citrus.report.TestResults; +import org.citrusframework.annotations.CitrusTestSource; +import org.citrusframework.common.TestLoader; +import org.citrusframework.junit.spring.JUnit4CitrusSpringSupport; +import org.citrusframework.report.TestReporter; +import org.citrusframework.report.TestResults; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.report.TestResult; import org.junit.Test; diff --git a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/xml/Yaks_IT.java b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/xml/Yaks_IT.java index 055b6243..1e16c52f 100644 --- a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/xml/Yaks_IT.java +++ b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/xml/Yaks_IT.java @@ -23,11 +23,11 @@ import java.nio.file.StandardOpenOption; import java.util.UUID; -import com.consol.citrus.annotations.CitrusTestSource; -import com.consol.citrus.common.TestLoader; -import com.consol.citrus.junit.spring.JUnit4CitrusSpringSupport; -import com.consol.citrus.report.TestReporter; -import com.consol.citrus.report.TestResults; +import org.citrusframework.annotations.CitrusTestSource; +import org.citrusframework.common.TestLoader; +import org.citrusframework.junit.spring.JUnit4CitrusSpringSupport; +import org.citrusframework.report.TestReporter; +import org.citrusframework.report.TestResults; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.report.TestResult; import org.junit.Test; diff --git a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/yaml/Yaks_IT.java b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/yaml/Yaks_IT.java index 22fd502e..6b7d20d9 100644 --- a/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/yaml/Yaks_IT.java +++ b/java/runtime/yaks-runtime-maven/src/test/java/org/citrusframework/yaks/yaml/Yaks_IT.java @@ -23,11 +23,11 @@ import java.nio.file.StandardOpenOption; import java.util.UUID; -import com.consol.citrus.annotations.CitrusTestSource; -import com.consol.citrus.common.TestLoader; -import com.consol.citrus.junit.spring.JUnit4CitrusSpringSupport; -import com.consol.citrus.report.TestReporter; -import com.consol.citrus.report.TestResults; +import org.citrusframework.annotations.CitrusTestSource; +import org.citrusframework.common.TestLoader; +import org.citrusframework.junit.spring.JUnit4CitrusSpringSupport; +import org.citrusframework.report.TestReporter; +import org.citrusframework.report.TestResults; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.report.TestResult; import org.junit.Test; diff --git a/java/runtime/yaks-runtime-maven/src/test/resources/cucumber.properties b/java/runtime/yaks-runtime-maven/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/runtime/yaks-runtime-maven/src/test/resources/cucumber.properties +++ b/java/runtime/yaks-runtime-maven/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-camel-k/pom.xml b/java/steps/yaks-camel-k/pom.xml index 2c9c95eb..183ea4f7 100644 --- a/java/steps/yaks-camel-k/pom.xml +++ b/java/steps/yaks-camel-k/pom.xml @@ -60,7 +60,7 @@ - com.consol.citrus + org.citrusframework citrus-base @@ -95,12 +95,12 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSettings.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSettings.java index 934c2133..5a97a315 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSettings.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSettings.java @@ -22,11 +22,6 @@ import org.citrusframework.yaks.YaksClusterType; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.kubernetes.KubernetesSettings; -import org.yaml.snakeyaml.Yaml; -import org.yaml.snakeyaml.introspector.Property; -import org.yaml.snakeyaml.nodes.NodeTuple; -import org.yaml.snakeyaml.nodes.Tag; -import org.yaml.snakeyaml.representer.Representer; /** * @author Christoph Deppisch @@ -151,21 +146,4 @@ public static boolean isPrintPodLogs() { return Boolean.parseBoolean(System.getProperty(PRINT_POD_LOGS_PROPERTY, System.getenv(PRINT_POD_LOGS_ENV) != null ? System.getenv(PRINT_POD_LOGS_ENV) : PRINT_POD_LOGS_DEFAULT)); } - - public static Yaml yaml() { - Representer representer = new Representer() { - @Override - protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) { - // if value of property is null, ignore it. - if (propertyValue == null) { - return null; - } - else { - return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag); - } - } - }; - representer.getPropertyUtils().setSkipMissingProperties(true); - return new Yaml(representer); - } } diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSteps.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSteps.java index d8566b97..4d41fe2a 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSteps.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/CamelKSteps.java @@ -23,27 +23,27 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ActionTimeoutException; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.fabric8.kubernetes.client.KubernetesClient; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ActionTimeoutException; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.camelk.actions.integration.CreateIntegrationAction; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import org.springframework.core.io.Resource; -import static com.consol.citrus.actions.CreateVariablesAction.Builder.createVariable; -import static com.consol.citrus.container.Assert.Builder.assertException; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.actions.CreateVariablesAction.Builder.createVariable; +import static org.citrusframework.container.Assert.Builder.assertException; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static org.citrusframework.yaks.camelk.actions.CamelKActionBuilder.camelk; public class CamelKSteps { @@ -285,7 +285,7 @@ private void createIntegration(String name, String language, String source, Map< if (!openApiSpec.isEmpty()) { try { Resource file = FileUtils.getFileResource(openApiSpec); - create.openApi(file.getFilename(), FileUtils.readToString(file)); + create.openApi(FileUtils.getFileName(file.getLocation()), FileUtils.readToString(file)); } catch (IOException e) { throw new CitrusRuntimeException(String.format("Failed to read openapi spec form file path %s", openApiSpec)); } diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/KameletSteps.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/KameletSteps.java index 476cda0a..d9539dae 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/KameletSteps.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/KameletSteps.java @@ -20,32 +20,31 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.exceptions.CitrusRuntimeException; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.fabric8.kubernetes.client.KubernetesClient; -import org.citrusframework.yaks.camelk.model.Pipe; -import org.citrusframework.yaks.camelk.model.PipeSpec; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.spi.Resources; import org.citrusframework.yaks.camelk.model.Kamelet; import org.citrusframework.yaks.camelk.model.KameletSpec; +import org.citrusframework.yaks.camelk.model.Pipe; +import org.citrusframework.yaks.camelk.model.PipeSpec; import org.citrusframework.yaks.kafka.KafkaSettings; import org.citrusframework.yaks.knative.KnativeSettings; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.Resource; import org.springframework.util.StringUtils; -import static com.consol.citrus.actions.CreateVariablesAction.Builder.createVariable; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.actions.CreateVariablesAction.Builder.createVariable; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static org.citrusframework.yaks.camelk.actions.CamelKActionBuilder.camelk; - public class KameletSteps { @CitrusResource @@ -218,7 +217,7 @@ public void bindKameletToKnativeChannel(String kameletName, String channel, Stri @Given("^load Kamelet ([a-z0-9-]+).kamelet.yaml$") public void loadKameletFromFile(String fileName) { - Resource resource = new ClassPathResource(fileName + ".kamelet.yaml"); + Resource resource = Resources.fromClasspath(fileName + ".kamelet.yaml"); runner.run(camelk() .client(k8sClient) .createKamelet(fileName) @@ -236,7 +235,7 @@ public void loadKameletFromFile(String fileName) { @Given("^load (?:Pipe|KameletBinding) ([a-z0-9-]+).yaml$") public void loadPipeFromFile(String fileName) { - Resource resource = new ClassPathResource(fileName + ".yaml"); + Resource resource = Resources.fromClasspath(fileName + ".yaml"); runner.run(camelk() .client(k8sClient) .createPipe(fileName) diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/AbstractCamelKAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/AbstractCamelKAction.java index d1a1e124..aa10ca6e 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/AbstractCamelKAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/AbstractCamelKAction.java @@ -17,9 +17,9 @@ package org.citrusframework.yaks.camelk.actions; -import com.consol.citrus.AbstractTestActionBuilder; -import com.consol.citrus.actions.AbstractTestAction; -import com.consol.citrus.context.TestContext; +import org.citrusframework.AbstractTestActionBuilder; +import org.citrusframework.actions.AbstractTestAction; +import org.citrusframework.context.TestContext; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksClusterType; import org.slf4j.Logger; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKAction.java index 34e2ee19..35c574e6 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.camelk.actions; -import com.consol.citrus.TestAction; -import com.consol.citrus.context.TestContext; +import org.citrusframework.TestAction; +import org.citrusframework.context.TestContext; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksClusterType; import org.citrusframework.yaks.YaksSettings; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKActionBuilder.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKActionBuilder.java index 869452a3..650bb1a6 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKActionBuilder.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/CamelKActionBuilder.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.camelk.actions; -import com.consol.citrus.TestActionBuilder; +import org.citrusframework.TestActionBuilder; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.camelk.actions.integration.CreateIntegrationAction; import org.citrusframework.yaks.camelk.actions.integration.DeleteIntegrationAction; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationAction.java index 803aadc7..b6bcd6ee 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationAction.java @@ -33,10 +33,10 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; -import com.consol.citrus.variable.VariableUtils; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.util.FileUtils; +import org.citrusframework.variable.VariableUtils; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.camelk.actions.AbstractCamelKAction; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationAction.java index ee701345..15853766 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.camelk.actions.integration; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.camelk.actions.AbstractCamelKAction; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationAction.java index 09861fec..34407aee 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationAction.java @@ -19,9 +19,9 @@ import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ActionTimeoutException; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ActionTimeoutException; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.dsl.PodResource; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/AbstractKameletAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/AbstractKameletAction.java index e248a92e..3a1f2caf 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/AbstractKameletAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/AbstractKameletAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.camelk.actions.kamelet; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import org.citrusframework.yaks.camelk.KameletSettings; import org.citrusframework.yaks.camelk.VariableNames; import org.citrusframework.yaks.camelk.actions.AbstractCamelKAction; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreateKameletAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreateKameletAction.java index 4df750e6..1336a182 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreateKameletAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreateKameletAction.java @@ -24,10 +24,11 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import com.fasterxml.jackson.core.JsonProcessingException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.KameletSettings; import org.citrusframework.yaks.camelk.model.Kamelet; @@ -36,7 +37,6 @@ import org.citrusframework.yaks.camelk.model.v1alpha1.KameletV1Alpha1; import org.citrusframework.yaks.camelk.model.v1alpha1.KameletV1Alpha1List; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import org.springframework.core.io.Resource; import org.springframework.util.StringUtils; /** diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeAction.java index 262c1778..b2a2521e 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeAction.java @@ -24,10 +24,11 @@ import java.nio.file.StandardOpenOption; import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import io.fabric8.kubernetes.client.KubernetesClient; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.jbang.CamelJBangSettings; @@ -41,7 +42,6 @@ import org.citrusframework.yaks.kubernetes.KubernetesSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.core.io.Resource; import static org.citrusframework.yaks.camelk.jbang.CamelJBang.camel; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeleteKameletAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeleteKameletAction.java index b2baaf93..557e3fc3 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeleteKameletAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeleteKameletAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.camelk.actions.kamelet; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.model.Kamelet; import org.citrusframework.yaks.camelk.model.KameletList; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeAction.java index e4b20d53..c4742298 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.camelk.actions.kamelet; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.camelk.CamelKSettings; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyKameletAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyKameletAction.java index e02d4496..0ce89bb9 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyKameletAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyKameletAction.java @@ -19,8 +19,8 @@ import java.util.Arrays; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ValidationException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ValidationException; import org.citrusframework.yaks.YaksClusterType; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.model.Kamelet; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeAction.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeAction.java index c759b86d..de72fb3c 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeAction.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeAction.java @@ -19,8 +19,8 @@ import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ValidationException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ValidationException; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.model.v1alpha1.KameletBinding; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBang.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBang.java index f4b540c2..b25f8dce 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBang.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBang.java @@ -44,8 +44,8 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.util.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StreamUtils; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBangSettings.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBangSettings.java index 18cc35f6..cfe94a01 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBangSettings.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/CamelJBangSettings.java @@ -35,7 +35,7 @@ public final class CamelJBangSettings { private static final String CAMEL_VERSION_PROPERTY = JBANG_PROPERTY_PREFIX + "camel.version"; private static final String CAMEL_VERSION_ENV = JBANG_ENV_PREFIX + "CAMEL_VERSION"; - private static final String CAMEL_VERSION_DEFAULT = "3.20.4"; + private static final String CAMEL_VERSION_DEFAULT = "4.1.0"; private static final String KAMELETS_VERSION_PROPERTY = JBANG_PROPERTY_PREFIX + "kamelets.version"; private static final String KAMELETS_VERSION_ENV = JBANG_ENV_PREFIX + "KAMELETS_VERSION"; diff --git a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/ProcessAndOutput.java b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/ProcessAndOutput.java index bfa94fb4..562a9b76 100644 --- a/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/ProcessAndOutput.java +++ b/java/steps/yaks-camel-k/src/main/java/org/citrusframework/yaks/camelk/jbang/ProcessAndOutput.java @@ -25,7 +25,7 @@ import java.io.InputStreamReader; import java.util.concurrent.TimeUnit; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.exceptions.CitrusRuntimeException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKFeature_IT.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKFeature_IT.java index a6addeb7..ed3629f8 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKFeature_IT.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKFeature_IT.java @@ -27,7 +27,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class CamelKFeature_IT { } diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKTestSteps.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKTestSteps.java index 621676be..c3220731 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKTestSteps.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/CamelKTestSteps.java @@ -19,8 +19,8 @@ import java.util.Collections; -import com.consol.citrus.Citrus; -import com.consol.citrus.annotations.CitrusFramework; +import org.citrusframework.Citrus; +import org.citrusframework.annotations.CitrusFramework; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/IntegrationBuilderTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/IntegrationBuilderTest.java index ef09bb9a..64d19293 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/IntegrationBuilderTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/IntegrationBuilderTest.java @@ -23,13 +23,13 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.spi.Resources; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.camelk.model.Integration; import org.citrusframework.yaks.camelk.model.IntegrationSpec; import org.citrusframework.yaks.kubernetes.KubernetesSupport; import org.junit.Assert; import org.junit.Test; -import org.springframework.core.io.ClassPathResource; import org.springframework.util.StringUtils; public class IntegrationBuilderTest { @@ -92,7 +92,7 @@ public void buildComplexIntegrationTest() throws IOException { final String json = KubernetesSupport.json().writeValueAsString(i); Assert.assertEquals(StringUtils.trimAllWhitespace( - FileUtils.readToString(new ClassPathResource("integration.json", IntegrationBuilderTest.class))), json); + FileUtils.readToString(Resources.create("integration.json", IntegrationBuilderTest.class))), json); } @Test @@ -105,6 +105,6 @@ public void buildOpenApiIntegrationTest() throws IOException { final String json = StringUtils.trimAllWhitespace(KubernetesSupport.json().writeValueAsString(i)); Assert.assertEquals(StringUtils.trimAllWhitespace( - FileUtils.readToString(new ClassPathResource("integration-api.json", IntegrationBuilderTest.class))), json); + FileUtils.readToString(Resources.create("integration-api.json", IntegrationBuilderTest.class))), json); } } diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java index 0b72665f..efa28b5e 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/KameletBuilderTest.java @@ -22,14 +22,14 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.util.FileUtils; import com.fasterxml.jackson.databind.ObjectMapper; +import org.citrusframework.spi.Resources; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.camelk.model.Kamelet; import org.citrusframework.yaks.camelk.model.KameletSpec; import org.citrusframework.yaks.kubernetes.KubernetesSupport; import org.junit.Assert; import org.junit.Test; -import org.springframework.core.io.ClassPathResource; import org.springframework.util.StringUtils; public class KameletBuilderTest { @@ -65,14 +65,14 @@ public void buildComplexKamelet() throws IOException { final String json = KubernetesSupport.json().writeValueAsString(kamelet); Assert.assertEquals(StringUtils.trimAllWhitespace( - FileUtils.readToString(new ClassPathResource("kamelet.json", KameletBuilderTest.class))), + FileUtils.readToString(Resources.create("kamelet.json", KameletBuilderTest.class))), StringUtils.trimAllWhitespace(json)); } @Test public void shouldDeserializeKamelet() throws IOException { Kamelet deserialized = new ObjectMapper().readValue( - FileUtils.readToString(new ClassPathResource("timer-source.kamelet.json")), Kamelet.class); + FileUtils.readToString(Resources.create("timer-source.kamelet.json")), Kamelet.class); Assert.assertNull(deserialized.getSpec().getFlow()); Assert.assertNotNull(deserialized.getSpec().getTemplate()); diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/PipeBuilderTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/PipeBuilderTest.java index 5385e33e..903d2345 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/PipeBuilderTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/PipeBuilderTest.java @@ -19,15 +19,15 @@ import java.io.IOException; -import com.consol.citrus.util.FileUtils; -import org.citrusframework.yaks.camelk.model.v1alpha1.KameletBinding; +import org.citrusframework.spi.Resources; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.camelk.model.Pipe; import org.citrusframework.yaks.camelk.model.PipeSpec; +import org.citrusframework.yaks.camelk.model.v1alpha1.KameletBinding; import org.citrusframework.yaks.kafka.KafkaSettings; import org.citrusframework.yaks.kubernetes.KubernetesSupport; import org.junit.Assert; import org.junit.Test; -import org.springframework.core.io.ClassPathResource; import org.springframework.util.StringUtils; public class PipeBuilderTest { @@ -58,7 +58,7 @@ public void buildComplexBinding() throws IOException { final String json = KubernetesSupport.json().writeValueAsString(pipe); Assert.assertEquals(StringUtils.trimAllWhitespace( - FileUtils.readToString(new ClassPathResource("kamelet-binding.json", PipeBuilderTest.class))), + FileUtils.readToString(Resources.create("kamelet-binding.json", PipeBuilderTest.class))), StringUtils.trimAllWhitespace(json)); } @@ -88,7 +88,7 @@ public void buildComplexPipe() throws IOException { final String json = KubernetesSupport.json().writeValueAsString(pipe); Assert.assertEquals(StringUtils.trimAllWhitespace( - FileUtils.readToString(new ClassPathResource("pipe.json", PipeBuilderTest.class))), + FileUtils.readToString(Resources.create("pipe.json", PipeBuilderTest.class))), StringUtils.trimAllWhitespace(json)); } } diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationActionTest.java index 58e0bcda..44f59f8a 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/CreateIntegrationActionTest.java @@ -24,8 +24,8 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationActionTest.java index 95c0e17a..7ce40d77 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/DeleteIntegrationActionTest.java @@ -23,8 +23,8 @@ import java.util.HashMap; import java.util.concurrent.TimeUnit; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; @@ -98,4 +98,4 @@ public void shouldDeleteLocalJBangIntegrationByName() { camel().stop(pid); } } -} \ No newline at end of file +} diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationActionTest.java index f12f3a79..150e9ccf 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/integration/VerifyIntegrationActionTest.java @@ -21,9 +21,9 @@ import java.nio.file.Path; import java.util.HashMap; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; -import com.consol.citrus.exceptions.ActionTimeoutException; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; +import org.citrusframework.exceptions.ActionTimeoutException; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; @@ -117,4 +117,4 @@ public void shouldVerifyLocalJBangIntegrationLogs() { camel().stop(pid); } } -} \ No newline at end of file +} diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeActionTest.java index 57313d8a..ec0c32b6 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/CreatePipeActionTest.java @@ -21,13 +21,14 @@ import java.util.Map; import java.util.concurrent.TimeUnit; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; import io.fabric8.mockwebserver.Context; import okhttp3.mockwebserver.MockWebServer; +import org.citrusframework.spi.Resources; import org.citrusframework.yaks.YaksClusterType; import org.citrusframework.yaks.camelk.CamelKSettings; import org.citrusframework.yaks.camelk.actions.integration.CreateIntegrationActionTest; @@ -39,7 +40,6 @@ import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.core.io.ClassPathResource; import static org.awaitility.Awaitility.await; import static org.citrusframework.yaks.camelk.jbang.CamelJBang.camel; @@ -67,7 +67,7 @@ public void shouldCreateBinding() { .client(kubernetesClient) .apiVersion(CamelKSettings.V1ALPHA1) .binding("kafka-source-binding") - .resource(new ClassPathResource("kafka-source-binding.yaml")) + .resource(Resources.fromClasspath("kafka-source-binding.yaml")) .build(); context.setVariable("YAKS_NAMESPACE", "default"); @@ -89,7 +89,7 @@ public void shouldCreateLocalJBangBinding() { .apiVersion(CamelKSettings.V1ALPHA1) .binding("timer-to-log-binding") .clusterType(YaksClusterType.LOCAL) - .resource(new ClassPathResource("timer-to-log-binding.yaml")) + .resource(Resources.fromClasspath("timer-to-log-binding.yaml")) .build(); action.execute(context); @@ -123,7 +123,7 @@ public void shouldCreatePipe() { .client(kubernetesClient) .apiVersion(CamelKSettings.V1) .pipe("kafka-source-pipe") - .resource(new ClassPathResource("kafka-source-pipe.yaml")) + .resource(Resources.fromClasspath("kafka-source-pipe.yaml")) .build(); context.setVariable("YAKS_NAMESPACE", "default"); diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeActionTest.java index 977a330f..d052c3f5 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/DeletePipeActionTest.java @@ -23,8 +23,8 @@ import java.util.HashMap; import java.util.concurrent.TimeUnit; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; diff --git a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeActionTest.java b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeActionTest.java index 87dd29f8..7aa406ca 100644 --- a/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeActionTest.java +++ b/java/steps/yaks-camel-k/src/test/java/org/citrusframework/yaks/camelk/actions/kamelet/VerifyPipeActionTest.java @@ -21,8 +21,8 @@ import java.nio.file.Path; import java.util.HashMap; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; diff --git a/java/steps/yaks-camel-k/src/test/resources/cucumber.properties b/java/steps/yaks-camel-k/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-camel-k/src/test/resources/cucumber.properties +++ b/java/steps/yaks-camel-k/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-camel-k/src/test/resources/log4j2-test.xml b/java/steps/yaks-camel-k/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-camel-k/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-camel-k/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-camel/pom.xml b/java/steps/yaks-camel/pom.xml index e10033fa..4ec9d5f4 100644 --- a/java/steps/yaks-camel/pom.xml +++ b/java/steps/yaks-camel/pom.xml @@ -42,11 +42,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-camel @@ -93,17 +93,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-text test diff --git a/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelReferenceResolver.java b/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelReferenceResolver.java index adb5c720..668a76af 100644 --- a/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelReferenceResolver.java +++ b/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelReferenceResolver.java @@ -20,9 +20,9 @@ import java.util.Map; import java.util.Set; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.spi.ReferenceResolver; -import com.consol.citrus.spi.SimpleReferenceResolver; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.ReferenceResolver; +import org.citrusframework.spi.SimpleReferenceResolver; import org.apache.camel.CamelContext; /** diff --git a/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelSteps.java b/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelSteps.java index f02f8609..0b887376 100644 --- a/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelSteps.java +++ b/java/steps/yaks-camel/src/main/java/org/citrusframework/yaks/camel/CamelSteps.java @@ -17,27 +17,13 @@ package org.citrusframework.yaks.camel; -import java.io.ByteArrayInputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Optional; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.camel.dsl.CamelSupport; -import com.consol.citrus.camel.endpoint.CamelEndpoint; -import com.consol.citrus.camel.endpoint.CamelEndpointConfiguration; -import com.consol.citrus.camel.endpoint.CamelSyncEndpoint; -import com.consol.citrus.camel.endpoint.CamelSyncEndpointConfiguration; -import com.consol.citrus.common.InitializingPhase; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.After; import io.cucumber.java.Before; @@ -45,27 +31,41 @@ import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; +import jakarta.xml.bind.JAXBException; import org.apache.camel.CamelContext; import org.apache.camel.ExchangePattern; -import org.apache.camel.ExtendedCamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; -import org.apache.camel.impl.engine.AbstractCamelContext; import org.apache.camel.model.ModelCamelContext; import org.apache.camel.model.RouteDefinition; -import org.apache.camel.model.RoutesDefinition; -import org.apache.camel.spi.XMLRoutesDefinitionLoader; import org.apache.camel.spring.SpringCamelContext; +import org.apache.camel.spring.xml.CamelRouteContextFactoryBean; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.camel.dsl.CamelSupport; +import org.citrusframework.camel.endpoint.CamelEndpoint; +import org.citrusframework.camel.endpoint.CamelEndpointConfiguration; +import org.citrusframework.camel.endpoint.CamelSyncEndpoint; +import org.citrusframework.camel.endpoint.CamelSyncEndpointConfiguration; +import org.citrusframework.camel.util.CamelUtils; +import org.citrusframework.common.InitializingPhase; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; +import org.citrusframework.xml.StringSource; import org.citrusframework.yaks.groovy.GroovyShellUtils; import org.codehaus.groovy.control.customizers.ImportCustomizer; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; import org.springframework.core.io.ByteArrayResource; -import org.springframework.core.io.Resource; -import static com.consol.citrus.actions.ReceiveMessageAction.Builder.receive; -import static com.consol.citrus.actions.SendMessageAction.Builder.send; -import static com.consol.citrus.camel.actions.CamelRouteActionBuilder.camel; +import static org.citrusframework.actions.ReceiveMessageAction.Builder.receive; +import static org.citrusframework.actions.SendMessageAction.Builder.send; +import static org.citrusframework.camel.actions.CamelRouteActionBuilder.camel; public class CamelSteps { @@ -189,7 +189,7 @@ public void bindComponent(String name, String configurationScript) { public void loadComponent(String filePath) throws IOException { Resource scriptFile = FileUtils.getFileResource(filePath + ".groovy"); String script = FileUtils.readToString(scriptFile); - final String fileName = scriptFile.getFilename(); + final String fileName = FileUtils.getFileName(scriptFile.getLocation()); final String baseName = Optional.ofNullable(fileName) .map(f -> f.lastIndexOf(".")) .filter(index -> index >= 0) @@ -200,39 +200,48 @@ public void loadComponent(String filePath) throws IOException { @Given("^Camel route ([^\\s]+)\\.xml") public void camelRouteXml(String id, String routeSpec) throws Exception { - String routeXml; + String routeContext = createRouteContext(id, routeSpec); + ModelCamelContext camelContext = (ModelCamelContext) camelContext(); - if (routeSpec.startsWith("")) { - routeXml = String.format("", id) + routeSpec.substring("".length()); - } else if (routeSpec.startsWith("", id) + routeSpec + ""; + List routesToUse; + try { + Object value = CamelUtils.getJaxbContext().createUnmarshaller().unmarshal(new StringSource(context.replaceDynamicContentInString(routeContext))); + if (value instanceof CamelRouteContextFactoryBean) { + CamelRouteContextFactoryBean factoryBean = (CamelRouteContextFactoryBean) value; + routesToUse = factoryBean.getRoutes(); + } else { + throw new CitrusRuntimeException(String.format("Failed to parse routes from given route context - expected %s but found %s", + CamelRouteContextFactoryBean.class, value.getClass())); + } + } catch (JAXBException e) { + throw new CitrusRuntimeException("Failed to create the JAXB unmarshaller", e); } - final XMLRoutesDefinitionLoader loader = camelContext().adapt(ExtendedCamelContext.class).getXMLRoutesDefinitionLoader(); - Object result = loader.loadRoutesDefinition(camelContext(), - new ByteArrayInputStream(context.replaceDynamicContentInString(routeXml).getBytes(StandardCharsets.UTF_8))); - if (result instanceof RoutesDefinition) { - RoutesDefinition routeDefinition = (RoutesDefinition) result; - - camelContext().addRoutes(new RouteBuilder(camelContext()) { - @Override - public void configure() throws Exception { - for (RouteDefinition route : routeDefinition.getRoutes()) { - try { - getRouteCollection().getRoutes().add(route); - log.info(String.format("Created new Camel route '%s' in context '%s'", route.getRouteId(), camelContext().getName())); - } catch (Exception e) { - throw new CitrusRuntimeException(String.format("Failed to create route definition '%s' in context '%s'", route.getRouteId(), camelContext().getName()), e); - } + camelContext.addRoutes(new RouteBuilder(camelContext) { + @Override + public void configure() throws Exception { + for (RouteDefinition routeDefinition : routesToUse) { + try { + getRouteCollection().getRoutes().add(routeDefinition); + } catch (Exception e) { + throw new CitrusRuntimeException(String.format("Failed to create route definition '%s' in context '%s'", routeDefinition.getId(), camelContext.getName()), e); } } - }); - - for (RouteDefinition route : routeDefinition.getRoutes()) { - camelContext().adapt(AbstractCamelContext.class).startRoute(route.getRouteId()); } + }); + } + + private String createRouteContext(String routeId, String routeSpec) { + final String routeContextElement = "%s"; + + if (routeSpec.startsWith("")) { + return String.format(routeContextElement, String.format("", routeId) + routeSpec.substring("".length())); + } else if (routeSpec.startsWith("")) { + return String.format(routeContextElement, routeSpec.substring("".length(), routeSpec.length() - "".length())); + } else if (routeSpec.startsWith("", routeId) + routeSpec + ""); } } @@ -258,19 +267,19 @@ protected void configureRoute(RouteDefinition route) { @Given("^start Camel route ([^\\s]+)$") public void startRoute(String routeId) { - runner.run(camel().context(camelContext().adapt(ModelCamelContext.class)) + runner.run(camel().context(camelContext()) .start(routeId)); } @Given("^stop Camel route ([^\\s]+)$") public void stopRoute(String routeId) { - runner.run(camel().context(camelContext().adapt(ModelCamelContext.class)) + runner.run(camel().context(camelContext()) .stop(routeId)); } @Given("^remove Camel route ([^\\s]+)$") public void removeRoute(String routeId) { - runner.run(camel().context(camelContext().adapt(ModelCamelContext.class)) + runner.run(camel().context(camelContext()) .remove(routeId)); } diff --git a/java/steps/yaks-camel/src/test/java/org/citrusframework/yaks/camel/CamelFeature_IT.java b/java/steps/yaks-camel/src/test/java/org/citrusframework/yaks/camel/CamelFeature_IT.java index 3e2021dc..1fe8346d 100644 --- a/java/steps/yaks-camel/src/test/java/org/citrusframework/yaks/camel/CamelFeature_IT.java +++ b/java/steps/yaks-camel/src/test/java/org/citrusframework/yaks/camel/CamelFeature_IT.java @@ -27,7 +27,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class CamelFeature_IT { } diff --git a/java/steps/yaks-camel/src/test/resources/cucumber.properties b/java/steps/yaks-camel/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-camel/src/test/resources/cucumber.properties +++ b/java/steps/yaks-camel/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-camel/src/test/resources/log4j2-test.xml b/java/steps/yaks-camel/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-camel/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-camel/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-groovy/pom.xml b/java/steps/yaks-groovy/pom.xml index eac12eea..8830a019 100644 --- a/java/steps/yaks-groovy/pom.xml +++ b/java/steps/yaks-groovy/pom.xml @@ -35,36 +35,36 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-http provided - com.consol.citrus + org.citrusframework citrus-jms provided - com.consol.citrus + org.citrusframework citrus-ws provided - com.consol.citrus + org.citrusframework citrus-mail provided - com.consol.citrus + org.citrusframework citrus-kafka provided - com.consol.citrus + org.citrusframework citrus-sql provided @@ -81,17 +81,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-text test diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScript.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScript.java index a0eec599..1ec1e697 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScript.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScript.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.groovy; -import com.consol.citrus.Citrus; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.context.TestContext; import groovy.lang.MissingPropertyException; import groovy.util.DelegatingScript; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScriptSteps.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScriptSteps.java index efc55c84..f973ae0f 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScriptSteps.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyScriptSteps.java @@ -22,25 +22,25 @@ import java.util.Map; import java.util.Optional; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.common.InitializingPhase; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.endpoint.Endpoint; -import com.consol.citrus.endpoint.EndpointBuilder; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.common.InitializingPhase; +import org.citrusframework.context.TestContext; +import org.citrusframework.endpoint.Endpoint; +import org.citrusframework.endpoint.EndpointBuilder; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.groovy.dsl.ConfigurationScript; import org.citrusframework.yaks.groovy.dsl.actions.ActionScript; import org.citrusframework.yaks.groovy.dsl.endpoints.EndpointConfigurationScript; import org.codehaus.groovy.control.customizers.ImportCustomizer; -import org.springframework.core.io.Resource; /** * @author Christoph Deppisch @@ -95,7 +95,7 @@ public void createEndpoint(String name, String configurationScript) { public void loadEndpoint(String filePath) throws IOException { Resource scriptFile = FileUtils.getFileResource(filePath + ".groovy"); String script = FileUtils.readToString(scriptFile); - final String fileName = scriptFile.getFilename(); + final String fileName = FileUtils.getFileName(scriptFile.getLocation()); final String baseName = Optional.ofNullable(fileName) .map(f -> f.lastIndexOf(".")) .filter(index -> index >= 0) @@ -120,7 +120,7 @@ public void createComponent(String name, String configurationScript) { public void loadComponent(String filePath) throws IOException { Resource scriptFile = FileUtils.getFileResource(filePath + ".groovy"); String script = FileUtils.readToString(scriptFile); - final String fileName = scriptFile.getFilename(); + final String fileName = FileUtils.getFileName(scriptFile.getLocation()); final String baseName = Optional.ofNullable(fileName) .map(f -> f.lastIndexOf(".")) .filter(index -> index >= 0) @@ -138,7 +138,7 @@ public void createActionScript(String scriptName, String code) { public void loadActionScript(String filePath) throws IOException { Resource scriptFile = FileUtils.getFileResource(filePath + ".groovy"); String script = FileUtils.readToString(scriptFile); - final String fileName = scriptFile.getFilename(); + final String fileName = FileUtils.getFileName(scriptFile.getLocation()); final String baseName = Optional.ofNullable(fileName) .map(f -> f.lastIndexOf(".")) .filter(index -> index >= 0) diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyShellUtils.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyShellUtils.java index 5001700a..8b4d1e2d 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyShellUtils.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/GroovyShellUtils.java @@ -20,8 +20,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.consol.citrus.Citrus; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.context.TestContext; import groovy.lang.Binding; import groovy.lang.GroovyShell; import groovy.lang.Script; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/CitrusConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/CitrusConfiguration.java index 2af03c62..61082e1e 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/CitrusConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/CitrusConfiguration.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.groovy.dsl; -import com.consol.citrus.Citrus; +import org.citrusframework.Citrus; import groovy.lang.Closure; import groovy.lang.DelegatesTo; import org.citrusframework.yaks.groovy.dsl.beans.BeansConfiguration; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/ConfigurationScript.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/ConfigurationScript.java index 8e3349e1..399de4bc 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/ConfigurationScript.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/ConfigurationScript.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.groovy.dsl; -import com.consol.citrus.Citrus; +import org.citrusframework.Citrus; import groovy.lang.Closure; import groovy.lang.DelegatesTo; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/EndpointsConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/EndpointsConfiguration.java index af6471a3..b06e7eeb 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/EndpointsConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/EndpointsConfiguration.java @@ -19,9 +19,9 @@ import java.util.function.Supplier; -import com.consol.citrus.Citrus; -import com.consol.citrus.common.InitializingPhase; -import com.consol.citrus.endpoint.Endpoint; +import org.citrusframework.Citrus; +import org.citrusframework.common.InitializingPhase; +import org.citrusframework.endpoint.Endpoint; import groovy.lang.Closure; import groovy.lang.GroovyObjectSupport; import groovy.lang.MissingMethodException; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/QueueConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/QueueConfiguration.java index 84b97a13..d2b4a521 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/QueueConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/QueueConfiguration.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.groovy.dsl; -import com.consol.citrus.Citrus; -import com.consol.citrus.message.DefaultMessageQueue; +import org.citrusframework.Citrus; +import org.citrusframework.message.DefaultMessageQueue; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionScript.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionScript.java index 55b4bcf7..046d11df 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionScript.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionScript.java @@ -17,9 +17,9 @@ package org.citrusframework.yaks.groovy.dsl.actions; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestActionRunner; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestActionRunner; +import org.citrusframework.context.TestContext; import org.citrusframework.yaks.groovy.GroovyShellUtils; import org.codehaus.groovy.control.customizers.ImportCustomizer; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/Actions.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/Actions.java index 99ddb7d3..9d1b6f3a 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/Actions.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/Actions.java @@ -21,23 +21,23 @@ import java.lang.reflect.Method; import java.util.Arrays; -import com.consol.citrus.TestActionBuilder; -import com.consol.citrus.actions.CreateVariablesAction; -import com.consol.citrus.actions.EchoAction; -import com.consol.citrus.actions.ExecutePLSQLAction; -import com.consol.citrus.actions.ExecuteSQLAction; -import com.consol.citrus.actions.ExecuteSQLQueryAction; -import com.consol.citrus.actions.FailAction; -import com.consol.citrus.actions.ReceiveMessageAction; -import com.consol.citrus.actions.SendMessageAction; -import com.consol.citrus.actions.SleepAction; -import com.consol.citrus.container.FinallySequence; -import com.consol.citrus.container.Iterate; -import com.consol.citrus.container.Parallel; -import com.consol.citrus.container.RepeatOnErrorUntilTrue; -import com.consol.citrus.container.RepeatUntilTrue; -import com.consol.citrus.container.Sequence; -import com.consol.citrus.container.Timer; +import org.citrusframework.TestActionBuilder; +import org.citrusframework.actions.CreateVariablesAction; +import org.citrusframework.actions.EchoAction; +import org.citrusframework.actions.ExecutePLSQLAction; +import org.citrusframework.actions.ExecuteSQLAction; +import org.citrusframework.actions.ExecuteSQLQueryAction; +import org.citrusframework.actions.FailAction; +import org.citrusframework.actions.ReceiveMessageAction; +import org.citrusframework.actions.SendMessageAction; +import org.citrusframework.actions.SleepAction; +import org.citrusframework.container.FinallySequence; +import org.citrusframework.container.Iterate; +import org.citrusframework.container.Parallel; +import org.citrusframework.container.RepeatOnErrorUntilTrue; +import org.citrusframework.container.RepeatUntilTrue; +import org.citrusframework.container.Sequence; +import org.citrusframework.container.Timer; import groovy.lang.GroovyRuntimeException; import org.springframework.util.ReflectionUtils; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionsConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionsConfiguration.java index 5c2020ad..5fb700f5 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionsConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/actions/ActionsConfiguration.java @@ -19,13 +19,13 @@ import java.util.function.Supplier; -import com.consol.citrus.TestAction; -import com.consol.citrus.TestActionBuilder; -import com.consol.citrus.TestActionRunner; -import com.consol.citrus.actions.SleepAction; -import com.consol.citrus.container.FinallySequence; -import com.consol.citrus.container.Wait; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.TestAction; +import org.citrusframework.TestActionBuilder; +import org.citrusframework.TestActionRunner; +import org.citrusframework.actions.SleepAction; +import org.citrusframework.container.FinallySequence; +import org.citrusframework.container.Wait; +import org.citrusframework.exceptions.CitrusRuntimeException; import groovy.lang.Closure; import groovy.lang.DelegatesTo; import groovy.lang.GroovyObjectSupport; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/beans/BeansConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/beans/BeansConfiguration.java index 9b5949b5..97f482cd 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/beans/BeansConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/beans/BeansConfiguration.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.groovy.dsl.beans; -import com.consol.citrus.Citrus; -import com.consol.citrus.message.DefaultMessageQueue; +import org.citrusframework.Citrus; +import org.citrusframework.message.DefaultMessageQueue; import groovy.lang.Closure; import groovy.lang.GroovyObjectSupport; import groovy.lang.GroovyRuntimeException; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderConfiguration.java index e896c7ea..333a546c 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderConfiguration.java @@ -23,8 +23,8 @@ import java.util.Map; import java.util.function.Supplier; -import com.consol.citrus.endpoint.Endpoint; -import com.consol.citrus.endpoint.EndpointBuilder; +import org.citrusframework.endpoint.Endpoint; +import org.citrusframework.endpoint.EndpointBuilder; import groovy.lang.MissingPropertyException; import org.springframework.util.ReflectionUtils; diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderHelper.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderHelper.java index bb605548..8d354983 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderHelper.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointBuilderHelper.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.groovy.dsl.endpoints; -import com.consol.citrus.endpoint.EndpointBuilder; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.endpoint.EndpointBuilder; +import org.citrusframework.exceptions.CitrusRuntimeException; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointConfiguration.java b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointConfiguration.java index 74514b98..6b1ecb63 100644 --- a/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointConfiguration.java +++ b/java/steps/yaks-groovy/src/main/java/org/citrusframework/yaks/groovy/dsl/endpoints/EndpointConfiguration.java @@ -19,9 +19,9 @@ import java.util.function.Supplier; -import com.consol.citrus.endpoint.AbstractEndpointBuilder; -import com.consol.citrus.endpoint.Endpoint; -import com.consol.citrus.endpoint.EndpointBuilder; +import org.citrusframework.endpoint.AbstractEndpointBuilder; +import org.citrusframework.endpoint.Endpoint; +import org.citrusframework.endpoint.EndpointBuilder; import groovy.lang.Closure; import groovy.lang.GroovyObjectSupport; import groovy.lang.MissingMethodException; diff --git a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/Foo.java b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/Foo.java index bb133198..8ad2a584 100644 --- a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/Foo.java +++ b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/Foo.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.groovy; -import com.consol.citrus.common.InitializingPhase; +import org.citrusframework.common.InitializingPhase; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyFeature_IT.java b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyFeature_IT.java index e218e66d..9ce2f529 100644 --- a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyFeature_IT.java +++ b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyFeature_IT.java @@ -30,7 +30,7 @@ "org.citrusframework.yaks.standard", "org.citrusframework.yaks.http" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class GroovyFeature_IT { } diff --git a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyTestSteps.java b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyTestSteps.java index 5576b1d9..58996c24 100644 --- a/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyTestSteps.java +++ b/java/steps/yaks-groovy/src/test/java/org/citrusframework/yaks/groovy/GroovyTestSteps.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.groovy; -import com.consol.citrus.Citrus; -import com.consol.citrus.annotations.CitrusFramework; +import org.citrusframework.Citrus; +import org.citrusframework.annotations.CitrusFramework; import io.cucumber.java.en.Then; import org.assertj.core.api.Assertions; diff --git a/java/steps/yaks-groovy/src/test/resources/cucumber.properties b/java/steps/yaks-groovy/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-groovy/src/test/resources/cucumber.properties +++ b/java/steps/yaks-groovy/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-groovy/src/test/resources/log4j2-test.xml b/java/steps/yaks-groovy/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-groovy/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-groovy/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-http/pom.xml b/java/steps/yaks-http/pom.xml index 15395116..f312afaf 100644 --- a/java/steps/yaks-http/pom.xml +++ b/java/steps/yaks-http/pom.xml @@ -41,11 +41,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-http @@ -56,17 +56,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-json test diff --git a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpClientSteps.java b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpClientSteps.java index bab12cd4..8adf1b06 100644 --- a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpClientSteps.java +++ b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpClientSteps.java @@ -25,39 +25,42 @@ import java.util.Map; import javax.net.ssl.SSLContext; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.http.actions.HttpClientActionBuilder; -import com.consol.citrus.http.actions.HttpClientRequestActionBuilder; -import com.consol.citrus.http.actions.HttpClientResponseActionBuilder; -import com.consol.citrus.http.client.HttpClient; -import com.consol.citrus.http.client.HttpClientBuilder; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.util.FileUtils; -import com.consol.citrus.variable.dictionary.DataDictionary; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.http.actions.HttpClientActionBuilder; +import org.citrusframework.http.actions.HttpClientRequestActionBuilder; +import org.citrusframework.http.actions.HttpClientResponseActionBuilder; +import org.citrusframework.http.client.HttpClient; +import org.citrusframework.http.client.HttpClientBuilder; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.util.FileUtils; +import org.citrusframework.variable.dictionary.DataDictionary; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustAllStrategy; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.ssl.SSLContexts; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.TrustAllStrategy; +import org.apache.hc.core5.ssl.SSLContexts; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.util.StringUtils; -import static com.consol.citrus.container.Wait.Builder.waitFor; -import static com.consol.citrus.http.actions.HttpActionBuilder.http; -import static com.consol.citrus.validation.PathExpressionValidationContext.Builder.pathExpression; +import static org.citrusframework.container.Wait.Builder.waitFor; +import static org.citrusframework.http.actions.HttpActionBuilder.http; +import static org.citrusframework.validation.PathExpressionValidationContext.Builder.pathExpression; /** * @author Christoph Deppisch @@ -355,7 +358,7 @@ private void sendClientRequest(HttpMessage request) { */ private void receiveClientResponse(HttpMessage response) { HttpClientResponseActionBuilder.HttpMessageBuilderSupport responseBuilder = http().client(httpClient).receive() - .response(response.getStatusCode()) + .response(HttpStatus.resolve(response.getStatusCode().value())) .message(response) .headerNameIgnoreCase(headerNameIgnoreCase); @@ -384,7 +387,7 @@ private HttpComponentsClientHttpRequestFactory sslRequestFactory() { * Get secure http client implementation with trust all strategy and noop host name verifier. * @return */ - private org.apache.http.client.HttpClient sslClient() { + private org.apache.hc.client5.http.classic.HttpClient sslClient() { try { SSLContext sslcontext = SSLContexts .custom() @@ -394,10 +397,12 @@ private org.apache.http.client.HttpClient sslClient() { SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory( sslcontext, NoopHostnameVerifier.INSTANCE); - return HttpClients - .custom() + PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create() .setSSLSocketFactory(sslSocketFactory) - .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) + .build(); + + return HttpClients.custom() + .setConnectionManager(connectionManager) .build(); } catch (NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) { throw new CitrusRuntimeException("Failed to create http client for ssl connection", e); diff --git a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpServerSteps.java b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpServerSteps.java index 9c05cb15..67c242b4 100644 --- a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpServerSteps.java +++ b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpServerSteps.java @@ -27,27 +27,28 @@ import java.util.Map; import java.util.Optional; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.http.actions.HttpServerActionBuilder; -import com.consol.citrus.http.actions.HttpServerRequestActionBuilder; -import com.consol.citrus.http.actions.HttpServerResponseActionBuilder; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.http.server.HttpServer; -import com.consol.citrus.http.server.HttpServerBuilder; -import com.consol.citrus.util.FileUtils; -import com.consol.citrus.variable.dictionary.DataDictionary; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.http.actions.HttpServerActionBuilder; +import org.citrusframework.http.actions.HttpServerRequestActionBuilder; +import org.citrusframework.http.actions.HttpServerResponseActionBuilder; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.util.FileUtils; +import org.citrusframework.variable.dictionary.DataDictionary; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; +import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; import org.eclipse.jetty.server.SecureRequestCustomizer; @@ -59,8 +60,8 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; -import static com.consol.citrus.http.actions.HttpActionBuilder.http; -import static com.consol.citrus.validation.PathExpressionValidationContext.Builder.pathExpression; +import static org.citrusframework.http.actions.HttpActionBuilder.http; +import static org.citrusframework.validation.PathExpressionValidationContext.Builder.pathExpression; /** * @author Christoph Deppisch @@ -442,7 +443,7 @@ public void sendServerResponse(HttpMessage response) { HttpServerResponseActionBuilder.HttpMessageBuilderSupport responseBuilder = http().server(httpServer) .send() - .response(response.getStatusCode()) + .response(HttpStatus.resolve(response.getStatusCode().value())) .message(response); if (outboundDictionary != null) { @@ -465,7 +466,7 @@ public void sendServerResponse(HttpStatus status) { private ServerConnector sslConnector() { ServerConnector connector = new ServerConnector(new Server(), - new SslConnectionFactory(sslContextFactory(), "http/1.1"), + new SslConnectionFactory(sslContextFactory(), HttpVersion.HTTP_1_1.asString()), new HttpConnectionFactory(httpConfiguration())); connector.setPort(securePort); return connector; @@ -476,11 +477,13 @@ private HttpConfiguration httpConfiguration() { parent.setSecureScheme("https"); parent.setSecurePort(securePort); HttpConfiguration configuration = new HttpConfiguration(parent); - configuration.setCustomizers(Collections.singletonList(new SecureRequestCustomizer())); + SecureRequestCustomizer secureRequestCustomizer = new SecureRequestCustomizer(); + secureRequestCustomizer.setSniHostCheck(false); + configuration.setCustomizers(Collections.singletonList(secureRequestCustomizer)); return configuration; } - private SslContextFactory sslContextFactory() { + private SslContextFactory.Server sslContextFactory() { try { SslContextFactory.Server contextFactory = new SslContextFactory.Server(); contextFactory.setKeyStorePath(getKeyStorePathPath()); diff --git a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpSteps.java b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpSteps.java index 6e86a00f..9984dfbf 100644 --- a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpSteps.java +++ b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/HttpSteps.java @@ -21,9 +21,9 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.message.MessageType; +import org.citrusframework.CitrusSettings; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.message.MessageType; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunction.java b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunction.java index e8654563..5b483728 100644 --- a/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunction.java +++ b/java/steps/yaks-http/src/main/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunction.java @@ -20,10 +20,10 @@ import java.util.List; import java.util.Locale; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.functions.Function; -import com.consol.citrus.http.server.HttpServer; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.functions.Function; +import org.citrusframework.http.server.HttpServer; import org.citrusframework.yaks.YaksSettings; public class ResolveServiceUrlFunction implements Function { diff --git a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpEndpointConfiguration.java b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpEndpointConfiguration.java index 918ba6e8..88435380 100644 --- a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpEndpointConfiguration.java +++ b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpEndpointConfiguration.java @@ -20,19 +20,19 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; -import com.consol.citrus.endpoint.EndpointAdapter; -import com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticResponseEndpointAdapter; -import com.consol.citrus.endpoint.adapter.mapping.HeaderMappingKeyExtractor; -import com.consol.citrus.endpoint.adapter.mapping.SimpleMappingStrategy; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.http.message.HttpMessageHeaders; -import com.consol.citrus.http.server.HttpServer; -import com.consol.citrus.http.server.HttpServerBuilder; -import com.consol.citrus.message.Message; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; +import org.citrusframework.endpoint.EndpointAdapter; +import org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticResponseEndpointAdapter; +import org.citrusframework.endpoint.adapter.mapping.HeaderMappingKeyExtractor; +import org.citrusframework.endpoint.adapter.mapping.SimpleMappingStrategy; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.http.message.HttpMessageHeaders; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.message.Message; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; diff --git a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpFeature_IT.java b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpFeature_IT.java index c2dcf68c..a15889a9 100644 --- a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpFeature_IT.java +++ b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/HttpFeature_IT.java @@ -27,7 +27,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class HttpFeature_IT { } diff --git a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunctionTest.java b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunctionTest.java index 33a9fe91..a11cdcf1 100644 --- a/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunctionTest.java +++ b/java/steps/yaks-http/src/test/java/org/citrusframework/yaks/http/function/ResolveServiceUrlFunctionTest.java @@ -20,10 +20,10 @@ import java.util.Arrays; import java.util.Collections; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; -import com.consol.citrus.functions.DefaultFunctionLibrary; -import com.consol.citrus.http.server.HttpServerBuilder; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; +import org.citrusframework.functions.DefaultFunctionLibrary; +import org.citrusframework.http.server.HttpServerBuilder; import org.citrusframework.yaks.YaksClusterType; import org.junit.Assert; import org.junit.Test; @@ -73,4 +73,4 @@ public void shouldResolveLocalService() { public void shouldResolve() { Assert.assertNotNull(new DefaultFunctionLibrary().getFunction("resolveURL")); } -} \ No newline at end of file +} diff --git a/java/steps/yaks-http/src/test/resources/cucumber.properties b/java/steps/yaks-http/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-http/src/test/resources/cucumber.properties +++ b/java/steps/yaks-http/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-http/src/test/resources/log4j2-test.xml b/java/steps/yaks-http/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-http/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-http/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-jdbc/pom.xml b/java/steps/yaks-jdbc/pom.xml index 0530fd39..6e418896 100644 --- a/java/steps/yaks-jdbc/pom.xml +++ b/java/steps/yaks-jdbc/pom.xml @@ -35,11 +35,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-sql @@ -50,17 +50,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-groovy test diff --git a/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSteps.java b/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSteps.java index f808a7fa..4e456dda 100644 --- a/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSteps.java +++ b/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSteps.java @@ -17,29 +17,29 @@ package org.citrusframework.yaks.jdbc; -import javax.sql.DataSource; import java.util.ArrayList; import java.util.List; import java.util.Map; +import javax.sql.DataSource; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.actions.ExecuteSQLQueryAction; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.actions.ExecuteSQLQueryAction; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import org.springframework.jdbc.datasource.SingleConnectionDataSource; -import static com.consol.citrus.actions.ExecuteSQLAction.Builder.sql; -import static com.consol.citrus.actions.ExecuteSQLQueryAction.Builder.query; -import static com.consol.citrus.container.RepeatOnErrorUntilTrue.Builder.repeatOnError; +import static org.citrusframework.actions.ExecuteSQLAction.Builder.sql; +import static org.citrusframework.actions.ExecuteSQLQueryAction.Builder.query; +import static org.citrusframework.container.RepeatOnErrorUntilTrue.Builder.repeatOnError; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-jdbc/src/test/java/org/citrusframework/yaks/jdbc/JdbcFeature_IT.java b/java/steps/yaks-jdbc/src/test/java/org/citrusframework/yaks/jdbc/JdbcFeature_IT.java index 9e461fc9..02689dab 100644 --- a/java/steps/yaks-jdbc/src/test/java/org/citrusframework/yaks/jdbc/JdbcFeature_IT.java +++ b/java/steps/yaks-jdbc/src/test/java/org/citrusframework/yaks/jdbc/JdbcFeature_IT.java @@ -32,7 +32,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class JdbcFeature_IT { diff --git a/java/steps/yaks-jdbc/src/test/resources/cucumber.properties b/java/steps/yaks-jdbc/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-jdbc/src/test/resources/cucumber.properties +++ b/java/steps/yaks-jdbc/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-jdbc/src/test/resources/log4j2-test.xml b/java/steps/yaks-jdbc/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-jdbc/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-jdbc/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-jdbc/src/test/resources/org/citrusframework/yaks/jdbc/jdbc.feature b/java/steps/yaks-jdbc/src/test/resources/org/citrusframework/yaks/jdbc/jdbc.feature index 42bbb7ea..9249ad96 100644 --- a/java/steps/yaks-jdbc/src/test/resources/org/citrusframework/yaks/jdbc/jdbc.feature +++ b/java/steps/yaks-jdbc/src/test/resources/org/citrusframework/yaks/jdbc/jdbc.feature @@ -21,19 +21,19 @@ Feature: JDBC steps Scenario: Verify column Given SQL query: SELECT task FROM todo WHERE id=1 - Then verify column TASK=Learn some CamelK! + Then verify column TASK=Learn some Camel K! Scenario: Verify result set Given SQL query: SELECT * FROM todo ORDER BY id Then verify columns | ID | 1 | 2 | 3 | 4 | @ignore@ | - | TASK | Learn some CamelK! | Get some milk | Do laundry | Wash the dog | Test CamelK with YAKS! | + | TASK | Learn some Camel K! | Get some milk | Do laundry | Wash the dog | Test CamelK with YAKS! | | COMPLETED | 0 | 0 | 0 | 0 | 0 | Scenario: Verify script Given SQL query: SELECT * FROM todo WHERE id=1 Then verify result set """ - assert rows.size == 1 - assert rows[0].TASK == 'Learn some CamelK!' + assert rows.size() == 1 + assert rows[0].TASK == 'Learn some Camel K!' """ diff --git a/java/steps/yaks-jdbc/src/test/resources/test-db-init.sql b/java/steps/yaks-jdbc/src/test/resources/test-db-init.sql index f40e8048..f4baf400 100644 --- a/java/steps/yaks-jdbc/src/test/resources/test-db-init.sql +++ b/java/steps/yaks-jdbc/src/test/resources/test-db-init.sql @@ -16,4 +16,4 @@ */ CREATE TABLE IF NOT EXISTS todo (id SERIAL PRIMARY KEY, task VARCHAR, completed INTEGER); -INSERT INTO todo (id, task, completed) VALUES (1, 'Learn some CamelK!', 0) +INSERT INTO todo (id, task, completed) VALUES (1, 'Learn some Camel K!', 0) diff --git a/java/steps/yaks-jms/pom.xml b/java/steps/yaks-jms/pom.xml index ef9a408e..cbfd2d58 100644 --- a/java/steps/yaks-jms/pom.xml +++ b/java/steps/yaks-jms/pom.xml @@ -35,23 +35,23 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-jms org.apache.activemq - activemq-client + activemq-client-jakarta provided org.apache.activemq - artemis-jms-client + artemis-jakarta-client provided @@ -62,22 +62,22 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-json test - com.consol.citrus + org.citrusframework citrus-validation-text test @@ -89,7 +89,7 @@ org.apache.activemq - activemq-broker + artemis-jakarta-server test diff --git a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/JmsSteps.java b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/JmsSteps.java index b628c906..c3f1493d 100644 --- a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/JmsSteps.java +++ b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/JmsSteps.java @@ -17,32 +17,32 @@ package org.citrusframework.yaks.jms; -import javax.jms.ConnectionFactory; import java.io.IOException; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.jms.endpoint.JmsEndpoint; -import com.consol.citrus.jms.endpoint.JmsEndpointBuilder; -import com.consol.citrus.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; +import jakarta.jms.ConnectionFactory; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.jms.endpoint.JmsEndpoint; +import org.citrusframework.jms.endpoint.JmsEndpointBuilder; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.jms.connection.ConnectionFactoryCreator; -import static com.consol.citrus.actions.ReceiveMessageAction.Builder.receive; -import static com.consol.citrus.actions.SendMessageAction.Builder.send; +import static org.citrusframework.actions.ReceiveMessageAction.Builder.receive; +import static org.citrusframework.actions.SendMessageAction.Builder.send; public class JmsSteps { @@ -101,6 +101,7 @@ public void setConnectionFactory(String name) { if (citrus.getCitrusContext().getReferenceResolver().isResolvable(name)) { connectionFactory = citrus.getCitrusContext().getReferenceResolver().resolve(name, ConnectionFactory.class); jmsEndpoint.getEndpointConfiguration().setConnectionFactory(connectionFactory); + jmsEndpoint.getEndpointConfiguration().getJmsTemplate().setConnectionFactory(connectionFactory); } else { throw new CitrusRuntimeException(String.format("Unable to find connection factory '%s'", name)); } @@ -117,11 +118,13 @@ public void setConnection(DataTable properties) throws ClassNotFoundException { citrus.getCitrusContext().getReferenceResolver().bind("connectionFactory", connectionFactory); jmsEndpoint.getEndpointConfiguration().setConnectionFactory(connectionFactory); + jmsEndpoint.getEndpointConfiguration().getJmsTemplate().setConnectionFactory(connectionFactory); } @Given("^(?:JMS|jms) destination: ([^\\s]+)$") public void setDestination(String destination) { jmsEndpoint.getEndpointConfiguration().setDestinationName(destination); + jmsEndpoint.getEndpointConfiguration().getJmsTemplate().setDefaultDestinationName(destination); } @Given("^(?:JMS|jms) endpoint \"([^\"\\s]+)\"$") diff --git a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreator.java b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreator.java index 0587ade5..5ad9ca9f 100644 --- a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreator.java +++ b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreator.java @@ -17,10 +17,10 @@ package org.citrusframework.yaks.jms.connection; -import javax.jms.ConnectionFactory; import java.util.Map; import java.util.ServiceLoader; +import jakarta.jms.ConnectionFactory; import org.springframework.util.Assert; /** diff --git a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreator.java b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreator.java index e63ed9e1..ed71c1d5 100644 --- a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreator.java +++ b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreator.java @@ -17,14 +17,14 @@ package org.citrusframework.yaks.jms.connection; -import javax.jms.ConnectionFactory; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.Arrays; import java.util.Collection; import java.util.Map; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import jakarta.jms.ConnectionFactory; +import org.citrusframework.exceptions.CitrusRuntimeException; import org.springframework.util.Assert; /** diff --git a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreator.java b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreator.java index 1df43a09..a4e97381 100644 --- a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreator.java +++ b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreator.java @@ -17,9 +17,9 @@ package org.citrusframework.yaks.jms.connection.activemq; -import javax.jms.ConnectionFactory; import java.util.Map; +import jakarta.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; import org.citrusframework.yaks.jms.connection.ConnectionFactoryCreator; diff --git a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/artemis/ActiveMQArtemisConnectionFactoryCreator.java b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/artemis/ActiveMQArtemisConnectionFactoryCreator.java index bc698b5a..39e457ea 100644 --- a/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/artemis/ActiveMQArtemisConnectionFactoryCreator.java +++ b/java/steps/yaks-jms/src/main/java/org/citrusframework/yaks/jms/connection/activemq/artemis/ActiveMQArtemisConnectionFactoryCreator.java @@ -17,36 +17,22 @@ package org.citrusframework.yaks.jms.connection.activemq.artemis; -import javax.jms.ConnectionFactory; -import javax.jms.JMSException; import java.util.Map; +import jakarta.jms.ConnectionFactory; import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.artemis.jms.client.DefaultConnectionProperties; import org.citrusframework.yaks.jms.connection.ConnectionFactoryCreator; public class ActiveMQArtemisConnectionFactoryCreator implements ConnectionFactoryCreator { @Override public ConnectionFactory create(Map properties) { - ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(); + String brokerUrl = properties.getOrDefault("brokerUrl", DefaultConnectionProperties.DEFAULT_BROKER_URL); + String user = properties.getOrDefault("username", DefaultConnectionProperties.DEFAULT_USER); + String password = properties.getOrDefault("password", DefaultConnectionProperties.DEFAULT_PASSWORD); - try { - if (properties.containsKey("brokerUrl")) { - connectionFactory.setBrokerURL(properties.get("brokerUrl")); - } - - if (properties.containsKey("username")) { - connectionFactory.setUser(properties.get("username")); - } - - if (properties.containsKey("password")) { - connectionFactory.setPassword(properties.get("password")); - } - } catch (JMSException e) { - throw new IllegalStateException("Error in initialization ConnectionFactory", e); - } - - return connectionFactory; + return new ActiveMQConnectionFactory(brokerUrl, user, password); } @Override diff --git a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsBrokerConfiguration.java b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsBrokerConfiguration.java index f77adb10..91f1768d 100644 --- a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsBrokerConfiguration.java +++ b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsBrokerConfiguration.java @@ -16,24 +16,40 @@ */ package org.citrusframework.yaks.jms; -import org.apache.activemq.broker.BrokerFactory; -import org.apache.activemq.broker.BrokerService; -import org.springframework.beans.factory.BeanCreationException; +import java.util.Collections; + +import jakarta.jms.ConnectionFactory; +import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration; +import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ; +import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; +import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager; +import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager; +import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; @Configuration public class JmsBrokerConfiguration { - @Bean(initMethod = "start", destroyMethod = "stop") - public BrokerService messageBroker() { - try { - BrokerService messageBroker = BrokerFactory.createBroker("broker:tcp://localhost:61616"); - messageBroker.setPersistent(false); - messageBroker.setUseJmx(false); - return messageBroker; - } catch (Exception e) { - throw new BeanCreationException("Failed to create embedded message broker", e); - } + @Bean(initMethod = "start", destroyMethod = "stop") + public EmbeddedActiveMQ messageBroker() { + EmbeddedActiveMQ broker = new EmbeddedActiveMQ(); + broker.setSecurityManager(securityManager()); + return broker; + } + + @Bean + public ActiveMQSecurityManager securityManager() { + SecurityConfiguration securityConfiguration = new SecurityConfiguration(Collections.singletonMap("citrus", "citrus"), + Collections.singletonMap("citrus", Collections.singletonList("citrus"))); + securityConfiguration.setDefaultUser("citrus"); + return new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), securityConfiguration); + } + + @Bean + @DependsOn("messageBroker") + public ConnectionFactory jmsConnectionFactory() { + return new ActiveMQConnectionFactory("tcp://localhost:61616", "citrus", "citrus"); } } diff --git a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsFeature_IT.java b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsFeature_IT.java index fde89e0d..a835af8c 100644 --- a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsFeature_IT.java +++ b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/JmsFeature_IT.java @@ -24,7 +24,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class JmsFeature_IT { } diff --git a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreatorTest.java b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreatorTest.java index 110fd087..4ea52398 100644 --- a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreatorTest.java +++ b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/ConnectionFactoryCreatorTest.java @@ -17,14 +17,14 @@ package org.citrusframework.yaks.jms.connection; -import javax.jms.Connection; -import javax.jms.ConnectionFactory; -import javax.jms.JMSContext; -import javax.jms.JMSException; - -import org.apache.activemq.ActiveMQConnectionFactory; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.JMSContext; +import jakarta.jms.JMSException; +import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.assertj.core.api.Assertions; import org.citrusframework.yaks.jms.connection.activemq.ActiveMQConnectionFactoryCreator; +import org.citrusframework.yaks.jms.connection.activemq.artemis.ActiveMQArtemisConnectionFactoryCreator; import org.junit.Test; /** @@ -34,14 +34,17 @@ public class ConnectionFactoryCreatorTest { @Test public void shouldLookup() throws ClassNotFoundException { - ConnectionFactoryCreator creator = ConnectionFactoryCreator.lookup(ActiveMQConnectionFactory.class.getName()); - Assertions.assertThat(ActiveMQConnectionFactoryCreator.class).isEqualTo(creator.getClass()); + ConnectionFactoryCreator creator = ConnectionFactoryCreator.lookup(org.apache.activemq.ActiveMQConnectionFactory.class.getName()); + Assertions.assertThat(creator.getClass()).isEqualTo(ActiveMQConnectionFactoryCreator.class); + + creator = ConnectionFactoryCreator.lookup(ActiveMQConnectionFactory.class.getName()); + Assertions.assertThat(creator.getClass()).isEqualTo(ActiveMQArtemisConnectionFactoryCreator.class); } @Test public void shouldLookupDefault() throws ClassNotFoundException { ConnectionFactoryCreator creator = ConnectionFactoryCreator.lookup(DummyConnectionFactory.class.getName()); - Assertions.assertThat(DefaultConnectionFactoryCreator.class).isEqualTo(creator.getClass()); + Assertions.assertThat(creator.getClass()).isEqualTo(DefaultConnectionFactoryCreator.class); } @Test(expected = ClassNotFoundException.class) diff --git a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreatorTest.java b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreatorTest.java index 57d1bcf4..f896778a 100644 --- a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreatorTest.java +++ b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/DefaultConnectionFactoryCreatorTest.java @@ -17,15 +17,16 @@ package org.citrusframework.yaks.jms.connection; -import javax.jms.ConnectionFactory; +import java.io.IOException; import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import org.apache.activemq.ActiveMQConnectionFactory; +import jakarta.jms.ConnectionFactory; +import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.assertj.core.api.Assertions; +import org.citrusframework.exceptions.CitrusRuntimeException; import org.junit.Test; /** @@ -33,31 +34,50 @@ */ public class DefaultConnectionFactoryCreatorTest { - private DefaultConnectionFactoryCreator connectionFactoryCreator = new DefaultConnectionFactoryCreator(); + private final DefaultConnectionFactoryCreator connectionFactoryCreator = new DefaultConnectionFactoryCreator(); @Test - public void shouldCreate() { + public void shouldCreate() throws IOException { Map connectionSettings = new HashMap<>(); - connectionSettings.put("type", ActiveMQConnectionFactory.class.getName()); + connectionSettings.put("type", org.apache.activemq.ActiveMQConnectionFactory.class.getName()); ConnectionFactory connectionFactory = connectionFactoryCreator.create(connectionSettings); - Assertions.assertThat(ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); - Assertions.assertThat(ActiveMQConnectionFactory.DEFAULT_BROKER_URL).isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); + Assertions.assertThat(org.apache.activemq.ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); + Assertions.assertThat(org.apache.activemq.ActiveMQConnectionFactory.DEFAULT_BROKER_URL).isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); + + connectionSettings = new HashMap<>(); + connectionSettings.put("type", ActiveMQConnectionFactory.class.getName()); + connectionFactory = connectionFactoryCreator.create(connectionSettings); + + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).toURI().toString()).startsWith("tcp://localhost:61616"); + Assertions.assertThat(connectionFactory.getClass()).isEqualTo(ActiveMQConnectionFactory.class); } @Test - public void shouldCreateWithConstructorArgs() { + public void shouldCreateWithConstructorArgs() throws IOException { Map connectionSettings = new LinkedHashMap<>(); - connectionSettings.put("type", ActiveMQConnectionFactory.class.getName()); + connectionSettings.put("type", org.apache.activemq.ActiveMQConnectionFactory.class.getName()); connectionSettings.put("username", "foo"); connectionSettings.put("password", "secret"); connectionSettings.put("brokerUrl", "typ://localhost:61617"); ConnectionFactory connectionFactory = connectionFactoryCreator.create(connectionSettings); + Assertions.assertThat(org.apache.activemq.ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); + Assertions.assertThat("typ://localhost:61617").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); + Assertions.assertThat("foo").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getUserName()); + Assertions.assertThat("secret").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getPassword()); + + connectionSettings = new LinkedHashMap<>(); + connectionSettings.put("type", ActiveMQConnectionFactory.class.getName()); + connectionSettings.put("brokerUrl", "tcp://localhost:61617"); + connectionSettings.put("username", "foo"); + connectionSettings.put("password", "secret"); + connectionFactory = connectionFactoryCreator.create(connectionSettings); + Assertions.assertThat(ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); - Assertions.assertThat("typ://localhost:61617").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); - Assertions.assertThat("foo").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getUserName()); - Assertions.assertThat("secret").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getPassword()); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).toURI().toString()).startsWith("tcp://localhost:61617"); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).getUser()).isEqualTo("foo"); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).getPassword()).isEqualTo("secret"); } @Test(expected = CitrusRuntimeException.class) diff --git a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreatorTest.java b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreatorTest.java index dbc41b90..22f81386 100644 --- a/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreatorTest.java +++ b/java/steps/yaks-jms/src/test/java/org/citrusframework/yaks/jms/connection/activemq/ActiveMQConnectionFactoryCreatorTest.java @@ -17,13 +17,15 @@ package org.citrusframework.yaks.jms.connection.activemq; -import javax.jms.ConnectionFactory; +import java.io.IOException; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; -import org.apache.activemq.ActiveMQConnectionFactory; +import jakarta.jms.ConnectionFactory; +import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory; import org.assertj.core.api.Assertions; +import org.citrusframework.yaks.jms.connection.activemq.artemis.ActiveMQArtemisConnectionFactoryCreator; import org.junit.Test; /** @@ -31,33 +33,51 @@ */ public class ActiveMQConnectionFactoryCreatorTest { - private ActiveMQConnectionFactoryCreator connectionFactoryCreator = new ActiveMQConnectionFactoryCreator(); + private final ActiveMQConnectionFactoryCreator connectionFactoryCreator = new ActiveMQConnectionFactoryCreator(); + private final ActiveMQArtemisConnectionFactoryCreator artemisConnectionFactoryCreator = new ActiveMQArtemisConnectionFactoryCreator(); @Test - public void shouldCreate() { + public void shouldCreate() throws IOException { ConnectionFactory connectionFactory = connectionFactoryCreator.create(Collections.emptyMap()); - Assertions.assertThat(ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); - Assertions.assertThat(ActiveMQConnectionFactory.DEFAULT_BROKER_URL).isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); + Assertions.assertThat(connectionFactory.getClass()).isEqualTo(org.apache.activemq.ActiveMQConnectionFactory.class); + Assertions.assertThat(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getBrokerURL()).isEqualTo(org.apache.activemq.ActiveMQConnectionFactory.DEFAULT_BROKER_URL); + + connectionFactory = artemisConnectionFactoryCreator.create(Collections.emptyMap()); + + Assertions.assertThat(connectionFactory.getClass()).isEqualTo(ActiveMQConnectionFactory.class); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).toURI().toString()).startsWith("tcp://localhost:61616"); } @Test public void shouldCreateWithProperties() { Map connectionSettings = new LinkedHashMap<>(); - connectionSettings.put("brokerUrl", "typ://localhost:61617"); + connectionSettings.put("brokerUrl", "tcp://localhost:61617"); connectionSettings.put("username", "foo"); connectionSettings.put("password", "secret"); ConnectionFactory connectionFactory = connectionFactoryCreator.create(connectionSettings); - Assertions.assertThat(ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); - Assertions.assertThat("typ://localhost:61617").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); - Assertions.assertThat("foo").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getUserName()); - Assertions.assertThat("secret").isEqualTo(((ActiveMQConnectionFactory)connectionFactory).getPassword()); + Assertions.assertThat(org.apache.activemq.ActiveMQConnectionFactory.class).isEqualTo(connectionFactory.getClass()); + Assertions.assertThat("tcp://localhost:61617").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getBrokerURL()); + Assertions.assertThat("foo").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getUserName()); + Assertions.assertThat("secret").isEqualTo(((org.apache.activemq.ActiveMQConnectionFactory)connectionFactory).getPassword()); + + connectionSettings = new LinkedHashMap<>(); + connectionSettings.put("brokerUrl", "tcp://localhost:61617"); + connectionSettings.put("username", "foo"); + connectionSettings.put("password", "secret"); + connectionFactory = artemisConnectionFactoryCreator.create(connectionSettings); + + Assertions.assertThat(connectionFactory.getClass()).isEqualTo(ActiveMQConnectionFactory.class); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).getUser()).isEqualTo("foo"); + Assertions.assertThat(((ActiveMQConnectionFactory)connectionFactory).getPassword()).isEqualTo("secret"); } @Test public void shouldSupport() { - Assertions.assertThat(connectionFactoryCreator.supports(ActiveMQConnectionFactory.class)).isTrue(); + Assertions.assertThat(connectionFactoryCreator.supports(org.apache.activemq.ActiveMQConnectionFactory.class)).isTrue(); Assertions.assertThat(connectionFactoryCreator.supports(ConnectionFactory.class)).isFalse(); + Assertions.assertThat(artemisConnectionFactoryCreator.supports(ActiveMQConnectionFactory.class)).isTrue(); + Assertions.assertThat(artemisConnectionFactoryCreator.supports(ConnectionFactory.class)).isFalse(); } } diff --git a/java/steps/yaks-jms/src/test/resources/broker.xml b/java/steps/yaks-jms/src/test/resources/broker.xml new file mode 100644 index 00000000..e9e4af9a --- /dev/null +++ b/java/steps/yaks-jms/src/test/resources/broker.xml @@ -0,0 +1,40 @@ + + + + + + false + + + tcp://localhost:61616 + + + + + + + + + + + + + + + + diff --git a/java/steps/yaks-jms/src/test/resources/cucumber.properties b/java/steps/yaks-jms/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-jms/src/test/resources/cucumber.properties +++ b/java/steps/yaks-jms/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-jms/src/test/resources/log4j2-test.xml b/java/steps/yaks-jms/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-jms/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-jms/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms-multiline.feature b/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms-multiline.feature index 037652bc..8711c09e 100644 --- a/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms-multiline.feature +++ b/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms-multiline.feature @@ -1,9 +1,7 @@ Feature: JMS multiline steps Background: - Given JMS connection factory - | type | org.apache.activemq.ActiveMQConnectionFactory | - | brokerUrl | tcp://localhost:61616 | + Given JMS connection factory jmsConnectionFactory Scenario: Predefined multiline body Given JMS message body diff --git a/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms.feature b/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms.feature index a4b78949..2f58e249 100644 --- a/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms.feature +++ b/java/steps/yaks-jms/src/test/resources/org/citrusframework/yaks/jms/jms.feature @@ -2,8 +2,10 @@ Feature: JMS steps Background: Given JMS connection factory - | type | org.apache.activemq.ActiveMQConnectionFactory | + | type | org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory | | brokerUrl | tcp://localhost:61616 | + | username | citrus | + | password | citrus | Given JMS destination: test Given variable body is "citrus:randomString(10)" Given variable key is "citrus:randomString(10)" diff --git a/java/steps/yaks-kafka/pom.xml b/java/steps/yaks-kafka/pom.xml index 526f45ae..4169ff2d 100644 --- a/java/steps/yaks-kafka/pom.xml +++ b/java/steps/yaks-kafka/pom.xml @@ -42,11 +42,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-kafka @@ -67,22 +67,22 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-json test - com.consol.citrus + org.citrusframework citrus-validation-text test diff --git a/java/steps/yaks-kafka/src/main/java/org/citrusframework/yaks/kafka/KafkaSteps.java b/java/steps/yaks-kafka/src/main/java/org/citrusframework/yaks/kafka/KafkaSteps.java index 13b7beed..07e51b8c 100644 --- a/java/steps/yaks-kafka/src/main/java/org/citrusframework/yaks/kafka/KafkaSteps.java +++ b/java/steps/yaks-kafka/src/main/java/org/citrusframework/yaks/kafka/KafkaSteps.java @@ -21,18 +21,18 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.kafka.endpoint.KafkaEndpoint; -import com.consol.citrus.kafka.endpoint.KafkaEndpointBuilder; -import com.consol.citrus.kafka.message.KafkaMessage; -import com.consol.citrus.kafka.message.KafkaMessageHeaders; -import com.consol.citrus.message.Message; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.kafka.endpoint.KafkaEndpoint; +import org.citrusframework.kafka.endpoint.KafkaEndpointBuilder; +import org.citrusframework.kafka.message.KafkaMessage; +import org.citrusframework.kafka.message.KafkaMessageHeaders; +import org.citrusframework.message.Message; +import org.citrusframework.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -41,8 +41,8 @@ import io.cucumber.java.en.When; import org.citrusframework.yaks.YaksSettings; -import static com.consol.citrus.actions.ReceiveMessageAction.Builder.receive; -import static com.consol.citrus.actions.SendMessageAction.Builder.send; +import static org.citrusframework.actions.ReceiveMessageAction.Builder.receive; +import static org.citrusframework.actions.SendMessageAction.Builder.send; public class KafkaSteps { diff --git a/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/EmbeddedKafkaConfiguration.java b/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/EmbeddedKafkaConfiguration.java index 89b34ecc..26acae20 100644 --- a/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/EmbeddedKafkaConfiguration.java +++ b/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/EmbeddedKafkaConfiguration.java @@ -19,8 +19,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import com.consol.citrus.kafka.embedded.EmbeddedKafkaServer; -import com.consol.citrus.kafka.embedded.EmbeddedKafkaServerBuilder; +import org.citrusframework.kafka.embedded.EmbeddedKafkaServer; +import org.citrusframework.kafka.embedded.EmbeddedKafkaServerBuilder; @Configuration public class EmbeddedKafkaConfiguration { diff --git a/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/KafkaFeature_IT.java b/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/KafkaFeature_IT.java index b8643ace..2db9577c 100644 --- a/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/KafkaFeature_IT.java +++ b/java/steps/yaks-kafka/src/test/java/org/citrusframework/yaks/kafka/KafkaFeature_IT.java @@ -24,7 +24,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class KafkaFeature_IT { } diff --git a/java/steps/yaks-kafka/src/test/resources/cucumber.properties b/java/steps/yaks-kafka/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-kafka/src/test/resources/cucumber.properties +++ b/java/steps/yaks-kafka/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-kafka/src/test/resources/log4j2-test.xml b/java/steps/yaks-kafka/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-kafka/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-kafka/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-knative/pom.xml b/java/steps/yaks-knative/pom.xml index 83993514..aa55c532 100644 --- a/java/steps/yaks-knative/pom.xml +++ b/java/steps/yaks-knative/pom.xml @@ -48,11 +48,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-http @@ -83,17 +83,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-json test @@ -102,11 +102,6 @@ kubernetes-server-mock test - - io.fabric8 - knative-mock - test - com.squareup.okhttp3 mockwebserver diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeEventingSteps.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeEventingSteps.java index 4cb76380..90bb89b7 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeEventingSteps.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeEventingSteps.java @@ -17,10 +17,10 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -29,9 +29,9 @@ import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import static com.consol.citrus.actions.CreateVariablesAction.Builder.createVariable; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; -import static com.consol.citrus.container.RepeatOnErrorUntilTrue.Builder.repeatOnError; +import static org.citrusframework.actions.CreateVariablesAction.Builder.createVariable; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.RepeatOnErrorUntilTrue.Builder.repeatOnError; import static org.citrusframework.yaks.knative.actions.KnativeActionBuilder.knative; /** diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeMessagingSteps.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeMessagingSteps.java index 7387cb9d..b51c9f8a 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeMessagingSteps.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeMessagingSteps.java @@ -17,10 +17,10 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; @@ -28,7 +28,7 @@ import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static org.citrusframework.yaks.knative.actions.KnativeActionBuilder.knative; /** diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSteps.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSteps.java index c155d325..28159f6f 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSteps.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSteps.java @@ -17,17 +17,17 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.kubernetes.KubernetesSupport; -import static com.consol.citrus.actions.CreateVariablesAction.Builder.createVariable; +import static org.citrusframework.actions.CreateVariablesAction.Builder.createVariable; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSupport.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSupport.java index 01a7f727..2b634b26 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSupport.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/KnativeSupport.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; +import org.citrusframework.Citrus; import io.fabric8.knative.client.DefaultKnativeClient; import io.fabric8.knative.client.KnativeClient; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ReceiveEventSteps.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ReceiveEventSteps.java index 0a2655ac..6d4be097 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ReceiveEventSteps.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ReceiveEventSteps.java @@ -17,12 +17,12 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/SendEventSteps.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/SendEventSteps.java index 025c8cda..9a6d803e 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/SendEventSteps.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/SendEventSteps.java @@ -17,30 +17,32 @@ package org.citrusframework.yaks.knative; -import javax.net.ssl.SSLContext; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.util.Objects; +import javax.net.ssl.SSLContext; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.http.actions.HttpClientRequestActionBuilder; -import com.consol.citrus.http.client.HttpClient; -import com.consol.citrus.http.client.HttpClientBuilder; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import io.cucumber.java.en.Given; import io.cucumber.java.en.When; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.SSLConnectionSocketFactory; -import org.apache.http.conn.ssl.TrustAllStrategy; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.ssl.SSLContexts; +import org.apache.hc.client5.http.impl.classic.HttpClients; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager; +import org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManagerBuilder; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.client5.http.ssl.SSLConnectionSocketFactory; +import org.apache.hc.client5.http.ssl.TrustAllStrategy; +import org.apache.hc.core5.ssl.SSLContexts; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.http.actions.HttpClientRequestActionBuilder; +import org.citrusframework.http.client.HttpClient; +import org.citrusframework.http.client.HttpClientBuilder; import org.citrusframework.yaks.knative.ce.CloudEventMessage; import org.citrusframework.yaks.knative.ce.CloudEventSupport; import org.springframework.http.HttpStatus; @@ -48,7 +50,7 @@ import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.util.StringUtils; -import static com.consol.citrus.http.actions.HttpActionBuilder.http; +import static org.citrusframework.http.actions.HttpActionBuilder.http; /** * @author Christoph Deppisch @@ -178,7 +180,7 @@ private HttpComponentsClientHttpRequestFactory sslRequestFactory() { * Get secure http client implementation with trust all strategy and noop host name verifier. * @return */ - private org.apache.http.client.HttpClient sslClient() { + private org.apache.hc.client5.http.classic.HttpClient sslClient() { try { SSLContext sslcontext = SSLContexts .custom() @@ -188,10 +190,12 @@ private org.apache.http.client.HttpClient sslClient() { SSLConnectionSocketFactory sslSocketFactory = new SSLConnectionSocketFactory( sslcontext, NoopHostnameVerifier.INSTANCE); - return HttpClients - .custom() + PoolingHttpClientConnectionManager connectionManager = PoolingHttpClientConnectionManagerBuilder.create() .setSSLSocketFactory(sslSocketFactory) - .setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE) + .build(); + + return HttpClients.custom() + .setConnectionManager(connectionManager) .build(); } catch (NoSuchAlgorithmException | KeyStoreException | KeyManagementException e) { throw new CitrusRuntimeException("Failed to create http client for ssl connection", e); diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/AbstractKnativeAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/AbstractKnativeAction.java index 7cec24b6..7f15c015 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/AbstractKnativeAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/AbstractKnativeAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.knative.actions; -import com.consol.citrus.AbstractTestActionBuilder; -import com.consol.citrus.actions.AbstractTestAction; +import org.citrusframework.AbstractTestActionBuilder; +import org.citrusframework.actions.AbstractTestAction; import io.fabric8.knative.client.KnativeClient; import io.fabric8.kubernetes.client.KubernetesClient; import org.slf4j.Logger; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/DeleteKnativeResourceAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/DeleteKnativeResourceAction.java index 53db06f5..f5512e50 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/DeleteKnativeResourceAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/DeleteKnativeResourceAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative.actions; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import org.citrusframework.yaks.knative.KnativeSupport; import org.citrusframework.yaks.kubernetes.KubernetesSupport; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeAction.java index 5d15e8b8..a734332a 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.knative.actions; -import com.consol.citrus.TestAction; -import com.consol.citrus.context.TestContext; +import org.citrusframework.TestAction; +import org.citrusframework.context.TestContext; import io.fabric8.knative.client.KnativeClient; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.knative.KnativeSettings; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeActionBuilder.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeActionBuilder.java index d53caa82..85c61020 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeActionBuilder.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/KnativeActionBuilder.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative.actions; -import com.consol.citrus.TestActionBuilder; +import org.citrusframework.TestActionBuilder; import io.fabric8.knative.client.KnativeClient; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.knative.actions.eventing.CreateBrokerAction; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateBrokerAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateBrokerAction.java index fe56b58d..4267d378 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateBrokerAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateBrokerAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative.actions.eventing; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import io.fabric8.knative.eventing.v1.Broker; import io.fabric8.knative.eventing.v1.BrokerBuilder; import org.citrusframework.yaks.knative.KnativeSettings; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateTriggerAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateTriggerAction.java index 1b15709d..3377401e 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateTriggerAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/CreateTriggerAction.java @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import io.fabric8.knative.eventing.v1.Trigger; import io.fabric8.knative.eventing.v1.TriggerBuilder; import io.fabric8.knative.eventing.v1.TriggerSpecBuilder; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/VerifyBrokerAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/VerifyBrokerAction.java index 2b7955aa..9cc409e5 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/VerifyBrokerAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/eventing/VerifyBrokerAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.knative.actions.eventing; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ValidationException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ValidationException; import io.fabric8.knative.eventing.v1.Broker; import io.fabric8.kubernetes.client.KubernetesClientException; import org.citrusframework.yaks.knative.actions.AbstractKnativeAction; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateChannelAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateChannelAction.java index 9fc17bbe..e3a7231f 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateChannelAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateChannelAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative.actions.messaging; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import io.fabric8.knative.messaging.v1.Channel; import io.fabric8.knative.messaging.v1.ChannelBuilder; import org.citrusframework.yaks.knative.KnativeSettings; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateSubscriptionAction.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateSubscriptionAction.java index 13bdac7f..937d3661 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateSubscriptionAction.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/actions/messaging/CreateSubscriptionAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.knative.actions.messaging; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder; import io.fabric8.knative.messaging.v1.Subscription; import io.fabric8.knative.messaging.v1.SubscriptionBuilder; diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventMessage.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventMessage.java index e8178d8f..284adec1 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventMessage.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventMessage.java @@ -20,7 +20,7 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.http.message.HttpMessage; +import org.citrusframework.http.message.HttpMessage; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventSupport.java b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventSupport.java index 1772f962..a5a59ce0 100644 --- a/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventSupport.java +++ b/java/steps/yaks-knative/src/main/java/org/citrusframework/yaks/knative/ce/CloudEventSupport.java @@ -21,8 +21,8 @@ import java.util.Map; import java.util.Optional; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.message.MessageType; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.message.MessageType; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeFeature_IT.java b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeFeature_IT.java index 53868130..1f6a5fb9 100644 --- a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeFeature_IT.java +++ b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeFeature_IT.java @@ -27,7 +27,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class KnativeFeature_IT { } diff --git a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeServiceConfiguration.java b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeServiceConfiguration.java index 95df9897..d2e005f4 100644 --- a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeServiceConfiguration.java +++ b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeServiceConfiguration.java @@ -19,19 +19,19 @@ import java.util.HashMap; -import com.consol.citrus.endpoint.EndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.http.server.HttpServer; -import com.consol.citrus.http.server.HttpServerBuilder; -import com.consol.citrus.message.Message; import io.fabric8.knative.client.KnativeClient; -import io.fabric8.knative.mock.KnativeMockServer; import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; +import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; import io.fabric8.mockwebserver.Context; import okhttp3.mockwebserver.MockWebServer; import org.assertj.core.api.Assertions; +import org.citrusframework.endpoint.EndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.message.Message; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; @@ -46,24 +46,24 @@ public class KnativeServiceConfiguration { private static final int HTTP_PORT = 8080; - private final KnativeMockServer knativeServer = new KnativeMockServer(new Context(), new MockWebServer(), + private final KubernetesMockServer kubernetesServer = new KubernetesMockServer(new Context(), new MockWebServer(), new HashMap<>(), new KubernetesCrudDispatcher(), false); @Bean(initMethod = "init", destroyMethod = "destroy") - public KnativeMockServer knativeMockServer() { - return knativeServer; + public KubernetesMockServer kubernetesMockServer() { + return kubernetesServer; } @Bean(destroyMethod = "close") - @DependsOn("knativeMockServer") + @DependsOn("kubernetesMockServer") public KnativeClient knativeClient() { - return knativeServer.createKnative(); + return kubernetesClient().adapt(KnativeClient.class); } @Bean(destroyMethod = "close") - @DependsOn("knativeMockServer") + @DependsOn("kubernetesMockServer") public KubernetesClient kubernetesClient() { - return knativeServer.createClient(); + return kubernetesServer.createClient(); } @Bean diff --git a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeTestSteps.java b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeTestSteps.java index 332f1d52..d7b71493 100644 --- a/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeTestSteps.java +++ b/java/steps/yaks-knative/src/test/java/org/citrusframework/yaks/knative/KnativeTestSteps.java @@ -17,13 +17,13 @@ package org.citrusframework.yaks.knative; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.actions.AbstractTestAction; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.http.message.HttpMessage; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.actions.AbstractTestAction; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.http.message.HttpMessage; import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; @@ -40,7 +40,7 @@ import org.citrusframework.yaks.kubernetes.KubernetesSupport; import org.springframework.http.HttpStatus; -import static com.consol.citrus.http.actions.HttpActionBuilder.http; +import static org.citrusframework.http.actions.HttpActionBuilder.http; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-knative/src/test/resources/cucumber.properties b/java/steps/yaks-knative/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-knative/src/test/resources/cucumber.properties +++ b/java/steps/yaks-knative/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-knative/src/test/resources/log4j2-test.xml b/java/steps/yaks-knative/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-knative/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-knative/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-kubernetes/pom.xml b/java/steps/yaks-kubernetes/pom.xml index 3ce8804e..ad1b43b8 100644 --- a/java/steps/yaks-kubernetes/pom.xml +++ b/java/steps/yaks-kubernetes/pom.xml @@ -48,11 +48,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-http @@ -78,12 +78,12 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesActor.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesActor.java index 953c3805..708b450d 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesActor.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesActor.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.kubernetes; -import com.consol.citrus.TestActor; +import org.citrusframework.TestActor; import org.citrusframework.yaks.YaksSettings; /** diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSteps.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSteps.java index c6d47a3a..97348f9a 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSteps.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSteps.java @@ -25,16 +25,16 @@ import java.util.Locale; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ActionTimeoutException; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ActionTimeoutException; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -46,9 +46,9 @@ import org.citrusframework.yaks.kubernetes.actions.VerifyPodAction; import org.springframework.http.HttpStatus; -import static com.consol.citrus.actions.CreateVariablesAction.Builder.createVariable; -import static com.consol.citrus.container.Assert.Builder.assertException; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.actions.CreateVariablesAction.Builder.createVariable; +import static org.citrusframework.container.Assert.Builder.assertException; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static org.citrusframework.yaks.kubernetes.actions.KubernetesActionBuilder.kubernetes; public class KubernetesSteps { diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSupport.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSupport.java index a4d427d1..6179e4bf 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSupport.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/KubernetesSupport.java @@ -23,8 +23,6 @@ import java.util.Map; import java.util.Optional; -import com.consol.citrus.Citrus; -import com.consol.citrus.context.TestContext; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationFeature; @@ -40,7 +38,9 @@ import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.KubernetesClientBuilder; import io.fabric8.kubernetes.client.KubernetesClientException; -import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; +import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; +import org.citrusframework.Citrus; +import org.citrusframework.context.TestContext; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.introspector.Property; @@ -134,51 +134,50 @@ public static ObjectMapper json() { } public static GenericKubernetesResource getResource(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context, String resourceName) { - return k8sClient.genericKubernetesResources(context.getGroup() + "/" + context.getVersion(), context.getKind()).inNamespace(namespace) + ResourceDefinitionContext context, String resourceName) { + return k8sClient.genericKubernetesResources(context).inNamespace(namespace) .withName(resourceName) .get(); } public static GenericKubernetesResourceList getResources(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context) { - return k8sClient.genericKubernetesResources(context.getGroup() + "/" + context.getVersion(), context.getKind()) + ResourceDefinitionContext context) { + return k8sClient.genericKubernetesResources(context) .inNamespace(namespace) .list(); } public static GenericKubernetesResourceList getResources(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context, String labelKey, String labelValue) { - return k8sClient.genericKubernetesResources(context.getGroup() + "/" + context.getVersion(), context.getKind()) + ResourceDefinitionContext context, String labelKey, String labelValue) { + return k8sClient.genericKubernetesResources(context) .inNamespace(namespace) .withLabel(labelKey, labelValue) .list(); } public static void createResource(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context, T resource) { + ResourceDefinitionContext context, T resource) { createResource(k8sClient, namespace, context, yaml().dumpAsMap(resource)); } public static void createResource(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context, String yaml) { + ResourceDefinitionContext context, String yaml) { k8sClient.genericKubernetesResources(context).inNamespace(namespace) .load(new ByteArrayInputStream(yaml.getBytes(StandardCharsets.UTF_8))).createOrReplace(); } public static void deleteResource(KubernetesClient k8sClient, String namespace, - CustomResourceDefinitionContext context, String resourceName) { + ResourceDefinitionContext context, String resourceName) { k8sClient.genericKubernetesResources(context).inNamespace(namespace).withName(resourceName).delete(); } - public static CustomResourceDefinitionContext crdContext(String resourceType, String group, String kind, String version) { - return new CustomResourceDefinitionContext.Builder() - .withName(resourceType.contains(".") ? resourceType : String.format("%s.%s", resourceType, group)) + public static ResourceDefinitionContext crdContext(String resourceType, String group, String kind, String version) { + return new ResourceDefinitionContext.Builder() .withGroup(group) .withKind(kind) .withVersion(version) .withPlural(resourceType.contains(".") ? resourceType.substring(0, resourceType.indexOf(".")) : resourceType) - .withScope("Namespaced") + .withNamespaced(true) .build(); } diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/AbstractKubernetesAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/AbstractKubernetesAction.java index 6d7c27fc..7254f191 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/AbstractKubernetesAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/AbstractKubernetesAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.AbstractTestActionBuilder; -import com.consol.citrus.actions.AbstractTestAction; +import org.citrusframework.AbstractTestActionBuilder; +import org.citrusframework.actions.AbstractTestAction; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.kubernetes.KubernetesActor; import org.slf4j.Logger; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateAnnotationsAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateAnnotationsAction.java index 3d7671df..7d3a4641 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateAnnotationsAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateAnnotationsAction.java @@ -20,8 +20,8 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.PodBuilder; import io.fabric8.kubernetes.api.model.SecretBuilder; import io.fabric8.kubernetes.api.model.ServiceBuilder; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateCustomResourceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateCustomResourceAction.java index 032e7bd5..1e2d28aa 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateCustomResourceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateCustomResourceAction.java @@ -20,8 +20,8 @@ import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.GenericKubernetesResource; import org.citrusframework.yaks.kubernetes.KubernetesSupport; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateLabelsAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateLabelsAction.java index e1238b6f..0ec0ee01 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateLabelsAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateLabelsAction.java @@ -20,8 +20,8 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.PodBuilder; import io.fabric8.kubernetes.api.model.SecretBuilder; import io.fabric8.kubernetes.api.model.ServiceBuilder; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateResourceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateResourceAction.java index 890fa5ee..60653165 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateResourceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateResourceAction.java @@ -20,7 +20,7 @@ import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateSecretAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateSecretAction.java index 8e881eed..1dbcaba0 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateSecretAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateSecretAction.java @@ -23,14 +23,13 @@ import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; -import java.util.Optional; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; import io.fabric8.kubernetes.api.model.Secret; import io.fabric8.kubernetes.api.model.SecretBuilder; -import org.springframework.core.io.Resource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.spi.Resource; +import org.citrusframework.util.FileUtils; /** * @author Christoph Deppisch @@ -56,7 +55,9 @@ public void doExecute(TestContext context) { try { Resource file = FileUtils.getFileResource(context.replaceDynamicContentInString(filePath)); String resolvedFileContent = context.replaceDynamicContentInString(FileUtils.readToString(file, StandardCharsets.UTF_8)); - data.put(Optional.ofNullable(file.getFilename()).orElse("application.properties"), + + + data.put(FileUtils.getFileName(file.getLocation()), Base64.getEncoder().encodeToString(resolvedFileContent.getBytes(StandardCharsets.UTF_8))); } catch (IOException e) { throw new CitrusRuntimeException("Failed to read properties file", e); diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateServiceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateServiceAction.java index b0f49b64..8cbc9695 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateServiceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/CreateServiceAction.java @@ -22,7 +22,7 @@ import java.util.Collections; import java.util.List; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServiceBuilder; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteCustomResourceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteCustomResourceAction.java index c260337d..66a543df 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteCustomResourceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteCustomResourceAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; import org.citrusframework.yaks.kubernetes.KubernetesSupport; /** diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteResourceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteResourceAction.java index 607897b9..0339983d 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteResourceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteResourceAction.java @@ -20,7 +20,7 @@ import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteSecretAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteSecretAction.java index 6cadcaf4..cda1581c 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteSecretAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteSecretAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteServiceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteServiceAction.java index 36bea758..7303e447 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteServiceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/DeleteServiceAction.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.context.TestContext; +import org.citrusframework.context.TestContext; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesAction.java index 2160e4b7..c326de01 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesAction.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.TestAction; -import com.consol.citrus.context.TestContext; +import org.citrusframework.TestAction; +import org.citrusframework.context.TestContext; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.kubernetes.KubernetesSupport; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesActionBuilder.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesActionBuilder.java index 83268f8a..4c845aed 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesActionBuilder.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/KubernetesActionBuilder.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.TestActionBuilder; +import org.citrusframework.TestActionBuilder; import io.fabric8.kubernetes.client.KubernetesClient; import org.springframework.util.Assert; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyCustomResourceAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyCustomResourceAction.java index 889001d3..81f10476 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyCustomResourceAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyCustomResourceAction.java @@ -23,9 +23,10 @@ import java.util.Optional; import java.util.stream.Collectors; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ActionTimeoutException; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import io.fabric8.kubernetes.client.dsl.base.ResourceDefinitionContext; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ActionTimeoutException; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.GenericKubernetesResource; import io.fabric8.kubernetes.api.model.GenericKubernetesResourceList; import io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext; @@ -175,7 +176,7 @@ private boolean verifyResourceStatus(GenericKubernetesResource resource, String * @param context * @return */ - private CustomResourceDefinitionContext getCrdContext(TestContext context) { + private ResourceDefinitionContext getCrdContext(TestContext context) { return KubernetesSupport.crdContext( context.replaceDynamicContentInString(type), context.replaceDynamicContentInString(group), diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyPodAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyPodAction.java index 09d59b84..63c46d6d 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyPodAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/VerifyPodAction.java @@ -17,9 +17,9 @@ package org.citrusframework.yaks.kubernetes.actions; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.ActionTimeoutException; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.ActionTimeoutException; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.dsl.PodResource; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/WatchPodLogsAction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/WatchPodLogsAction.java index 9c668dd4..8cd759fa 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/WatchPodLogsAction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/actions/WatchPodLogsAction.java @@ -23,8 +23,8 @@ import java.time.Duration; import java.util.concurrent.TimeUnit; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.fabric8.kubernetes.api.model.Pod; import io.fabric8.kubernetes.api.model.PodList; import io.fabric8.kubernetes.client.dsl.LogWatch; diff --git a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunction.java b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunction.java index 9ac0b547..1ec78b03 100644 --- a/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunction.java +++ b/java/steps/yaks-kubernetes/src/main/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunction.java @@ -19,10 +19,10 @@ import java.util.List; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.exceptions.InvalidFunctionUsageException; -import com.consol.citrus.functions.Function; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.exceptions.InvalidFunctionUsageException; +import org.citrusframework.functions.Function; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.client.KubernetesClient; import org.citrusframework.yaks.YaksSettings; diff --git a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesFeature_IT.java b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesFeature_IT.java index 5649dd74..e37ae52f 100644 --- a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesFeature_IT.java +++ b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesFeature_IT.java @@ -27,7 +27,7 @@ @RunWith(Cucumber.class) @CucumberOptions( extraGlue = { "org.citrusframework.yaks.standard" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class KubernetesFeature_IT { } diff --git a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesServiceConfiguration.java b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesServiceConfiguration.java index a1276b30..5f65d0d7 100644 --- a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesServiceConfiguration.java +++ b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesServiceConfiguration.java @@ -22,7 +22,6 @@ import io.fabric8.kubernetes.client.KubernetesClient; import io.fabric8.kubernetes.client.server.mock.KubernetesCrudDispatcher; import io.fabric8.kubernetes.client.server.mock.KubernetesMockServer; -import io.fabric8.kubernetes.internal.KubernetesDeserializer; import io.fabric8.mockwebserver.Context; import okhttp3.mockwebserver.MockWebServer; import org.springframework.context.annotation.Bean; @@ -38,10 +37,6 @@ public class KubernetesServiceConfiguration { private final KubernetesMockServer k8sServer = new KubernetesMockServer(new Context(), new MockWebServer(), new HashMap<>(), new KubernetesCrudDispatcher(), false); - public KubernetesServiceConfiguration() { - KubernetesDeserializer.registerCustomKind("yaks.dev/v1", "Foo", Foo.class); - } - @Bean(initMethod = "init", destroyMethod = "destroy") public KubernetesMockServer k8sMockServer() { return k8sServer; diff --git a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesTestSteps.java b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesTestSteps.java index a816d7b8..e5e11b85 100644 --- a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesTestSteps.java +++ b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/KubernetesTestSteps.java @@ -19,12 +19,12 @@ import java.util.Collections; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.actions.AbstractTestAction; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.actions.AbstractTestAction; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.fabric8.kubernetes.api.model.Pod; diff --git a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunctionTest.java b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunctionTest.java index b6636af1..255c0c73 100644 --- a/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunctionTest.java +++ b/java/steps/yaks-kubernetes/src/test/java/org/citrusframework/yaks/kubernetes/functions/ServiceClusterIpFunctionTest.java @@ -19,10 +19,10 @@ import java.util.List; -import com.consol.citrus.Citrus; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.functions.DefaultFunctionLibrary; +import org.citrusframework.Citrus; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.functions.DefaultFunctionLibrary; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.Service; import io.fabric8.kubernetes.api.model.ServiceSpec; diff --git a/java/steps/yaks-kubernetes/src/test/resources/cucumber.properties b/java/steps/yaks-kubernetes/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-kubernetes/src/test/resources/cucumber.properties +++ b/java/steps/yaks-kubernetes/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-kubernetes/src/test/resources/log4j2-test.xml b/java/steps/yaks-kubernetes/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-kubernetes/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-kubernetes/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-openapi/pom.xml b/java/steps/yaks-openapi/pom.xml index 2c94737a..8824bb18 100644 --- a/java/steps/yaks-openapi/pom.xml +++ b/java/steps/yaks-openapi/pom.xml @@ -51,11 +51,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-validation-json @@ -66,17 +66,17 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-validation-hamcrest test diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiClientSteps.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiClientSteps.java index e851d8b6..46f54685 100644 --- a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiClientSteps.java +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiClientSteps.java @@ -23,13 +23,13 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.apicurio.datamodels.openapi.models.OasOperation; import io.apicurio.datamodels.openapi.models.OasParameter; import io.apicurio.datamodels.openapi.models.OasPathItem; diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiResourceLoader.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiResourceLoader.java index 03d15bb9..a36380cd 100644 --- a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiResourceLoader.java +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiResourceLoader.java @@ -17,8 +17,6 @@ package org.citrusframework.yaks.openapi; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; @@ -26,20 +24,19 @@ import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.util.Objects; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLContext; -import com.consol.citrus.util.FileUtils; import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.ObjectMapper; import io.apicurio.datamodels.Library; import io.apicurio.datamodels.openapi.models.OasDocument; -import org.apache.http.HttpHeaders; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.TrustAllStrategy; -import org.apache.http.ssl.SSLContexts; +import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.client5.http.ssl.TrustAllStrategy; +import org.apache.hc.core5.http.HttpHeaders; +import org.apache.hc.core5.ssl.SSLContexts; +import org.citrusframework.util.FileUtils; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.yaml.snakeyaml.Yaml; -import org.yaml.snakeyaml.constructor.SafeConstructor; /** * Loads Open API specifications from different locations like file resource or web resource. @@ -47,9 +44,6 @@ */ public final class OpenApiResourceLoader { - private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); - private static final Yaml YAML_PARSER = new Yaml(new SafeConstructor()); - /** * Prevent instantiation of utility class. */ @@ -143,7 +137,7 @@ private static OasDocument resolve(String specification) { return (OasDocument) Library.readDocumentFromJSONString(specification); } - final JsonNode node = OBJECT_MAPPER.convertValue(YAML_PARSER.load(specification), JsonNode.class); + final JsonNode node = OpenApiSupport.json().convertValue(OpenApiSupport.yaml().load(specification), JsonNode.class); return (OasDocument) Library.readDocument(node); } diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiServerSteps.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiServerSteps.java index 773003ae..51d08380 100644 --- a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiServerSteps.java +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiServerSteps.java @@ -23,13 +23,13 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.apicurio.datamodels.openapi.models.OasOperation; import io.apicurio.datamodels.openapi.models.OasParameter; import io.apicurio.datamodels.openapi.models.OasPathItem; diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSteps.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSteps.java index 92057ae0..61a85cee 100644 --- a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSteps.java +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSteps.java @@ -25,11 +25,11 @@ import java.util.Optional; import java.util.Properties; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.variable.dictionary.AbstractDataDictionary; -import com.consol.citrus.variable.dictionary.json.JsonPathMappingDataDictionary; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.variable.dictionary.AbstractDataDictionary; +import org.citrusframework.variable.dictionary.json.JsonPathMappingDataDictionary; import io.apicurio.datamodels.openapi.models.OasDocument; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSupport.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSupport.java new file mode 100644 index 00000000..d38a3d2e --- /dev/null +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiSupport.java @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.citrusframework.yaks.openapi; + +import java.util.Collection; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.json.JsonMapper; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; +import org.yaml.snakeyaml.introspector.Property; +import org.yaml.snakeyaml.nodes.NodeTuple; +import org.yaml.snakeyaml.nodes.Tag; +import org.yaml.snakeyaml.representer.Representer; + +public class OpenApiSupport { + + private static final ObjectMapper OBJECT_MAPPER; + + static { + OBJECT_MAPPER = JsonMapper.builder() + .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING) + .enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING) + .disable(JsonParser.Feature.AUTO_CLOSE_SOURCE) + .enable(MapperFeature.BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES) + .build() + .setDefaultPropertyInclusion(JsonInclude.Value.construct(JsonInclude.Include.NON_EMPTY, JsonInclude.Include.NON_EMPTY)); + } + + private OpenApiSupport() { + // prevent instantiation of utility class + } + + public static ObjectMapper json() { + return OBJECT_MAPPER; + } + + public static Yaml yaml() { + Representer representer = new Representer(new DumperOptions()) { + @Override + protected NodeTuple representJavaBeanProperty(Object javaBean, Property property, Object propertyValue, Tag customTag) { + // if value of property is null, ignore it. + if (propertyValue == null || (propertyValue instanceof Collection && ((Collection) propertyValue).isEmpty()) || + (propertyValue instanceof Map && ((Map) propertyValue).isEmpty())) { + return null; + } else { + return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag); + } + } + }; + representer.getPropertyUtils().setSkipMissingProperties(true); + return new Yaml(representer); + } +} diff --git a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiTestDataGenerator.java b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiTestDataGenerator.java index 91b8afab..423bb5b4 100644 --- a/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiTestDataGenerator.java +++ b/java/steps/yaks-openapi/src/main/java/org/citrusframework/yaks/openapi/OpenApiTestDataGenerator.java @@ -20,8 +20,8 @@ import java.util.Map; import java.util.stream.Collectors; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.context.TestContext; +import org.citrusframework.CitrusSettings; +import org.citrusframework.context.TestContext; import io.apicurio.datamodels.openapi.models.OasSchema; import org.citrusframework.yaks.openapi.model.OasModelHelper; import org.springframework.util.CollectionUtils; diff --git a/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/OpenApiFeature_IT.java b/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/OpenApiFeature_IT.java index 2232f32c..3fb2ddb9 100644 --- a/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/OpenApiFeature_IT.java +++ b/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/OpenApiFeature_IT.java @@ -30,7 +30,7 @@ "org.citrusframework.yaks.standard", "org.citrusframework.yaks.http" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class OpenApiFeature_IT { } diff --git a/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/PetstoreConfiguration.java b/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/PetstoreConfiguration.java index af15b42c..5c56f61e 100644 --- a/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/PetstoreConfiguration.java +++ b/java/steps/yaks-openapi/src/test/java/org/citrusframework/yaks/openapi/PetstoreConfiguration.java @@ -21,19 +21,19 @@ import java.util.Map; import java.util.Optional; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; -import com.consol.citrus.endpoint.EndpointAdapter; -import com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticResponseEndpointAdapter; -import com.consol.citrus.endpoint.adapter.mapping.HeaderMappingKeyExtractor; -import com.consol.citrus.endpoint.adapter.mapping.SimpleMappingStrategy; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.http.message.HttpMessageHeaders; -import com.consol.citrus.http.server.HttpServer; -import com.consol.citrus.http.server.HttpServerBuilder; -import com.consol.citrus.message.Message; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; +import org.citrusframework.endpoint.EndpointAdapter; +import org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticResponseEndpointAdapter; +import org.citrusframework.endpoint.adapter.mapping.HeaderMappingKeyExtractor; +import org.citrusframework.endpoint.adapter.mapping.SimpleMappingStrategy; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.http.message.HttpMessageHeaders; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.message.Message; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; diff --git a/java/steps/yaks-openapi/src/test/resources/cucumber.properties b/java/steps/yaks-openapi/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-openapi/src/test/resources/cucumber.properties +++ b/java/steps/yaks-openapi/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-openapi/src/test/resources/log4j2-test.xml b/java/steps/yaks-openapi/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-openapi/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-openapi/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-selenium/pom.xml b/java/steps/yaks-selenium/pom.xml index 7810adc9..c0506e5e 100644 --- a/java/steps/yaks-selenium/pom.xml +++ b/java/steps/yaks-selenium/pom.xml @@ -35,11 +35,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-selenium @@ -65,12 +65,12 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test - com.consol.citrus + org.citrusframework citrus-spring test diff --git a/java/steps/yaks-selenium/src/main/java/org/citrusframework/yaks/selenium/SeleniumSteps.java b/java/steps/yaks-selenium/src/main/java/org/citrusframework/yaks/selenium/SeleniumSteps.java index 60c4e96e..93790438 100644 --- a/java/steps/yaks-selenium/src/main/java/org/citrusframework/yaks/selenium/SeleniumSteps.java +++ b/java/steps/yaks-selenium/src/main/java/org/citrusframework/yaks/selenium/SeleniumSteps.java @@ -22,25 +22,24 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.selenium.actions.FindElementAction; -import com.consol.citrus.selenium.endpoint.SeleniumBrowser; -import com.consol.citrus.selenium.endpoint.SeleniumBrowserBuilder; -import com.consol.citrus.selenium.model.PageValidator; -import com.consol.citrus.selenium.model.WebPage; -import com.consol.citrus.variable.VariableUtils; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.selenium.actions.FindElementAction; +import org.citrusframework.selenium.endpoint.SeleniumBrowser; +import org.citrusframework.selenium.endpoint.SeleniumBrowserBuilder; +import org.citrusframework.selenium.model.PageValidator; +import org.citrusframework.selenium.model.WebPage; +import org.citrusframework.variable.VariableUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; -import org.springframework.util.StringUtils; -import static com.consol.citrus.selenium.actions.SeleniumActionBuilder.selenium; +import static org.citrusframework.selenium.actions.SeleniumActionBuilder.selenium; /** * @author Christoph Deppisch @@ -194,7 +193,7 @@ public void shouldDisplay(String property, String value, DataTable dataTable) { } if (propertyEntry.getKey().equals("styles") || propertyEntry.getKey().equals("style")) { - String[] propertyExpressions = StringUtils.delimitedListToStringArray(propertyEntry.getValue(), ";"); + String[] propertyExpressions = propertyEntry.getValue().split(";"); for (String propertyExpression : propertyExpressions) { String[] keyValue = propertyExpression.split("="); elementBuilder.style(keyValue[0].trim(), VariableUtils.cutOffDoubleQuotes(keyValue[1].trim())); @@ -202,7 +201,7 @@ public void shouldDisplay(String property, String value, DataTable dataTable) { } if (propertyEntry.getKey().equals("attributes") || propertyEntry.getKey().equals("attribute")) { - String[] propertyExpressions = StringUtils.commaDelimitedListToStringArray(propertyEntry.getValue()); + String[] propertyExpressions = propertyEntry.getValue().split(","); for (String propertyExpression : propertyExpressions) { String[] keyValue = propertyExpression.split("="); elementBuilder.attribute(keyValue[0].trim(), VariableUtils.cutOffDoubleQuotes(keyValue[1].trim())); diff --git a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumFeature_IT.java b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumFeature_IT.java index 5df352b7..6b8a1821 100644 --- a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumFeature_IT.java +++ b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumFeature_IT.java @@ -30,7 +30,7 @@ "org.citrusframework.yaks.standard", "org.citrusframework.yaks.http" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class SeleniumFeature_IT { } diff --git a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumStepsTest.java b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumStepsTest.java index dbc946d0..9d232960 100644 --- a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumStepsTest.java +++ b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/SeleniumStepsTest.java @@ -19,23 +19,23 @@ import java.net.URL; -import com.consol.citrus.Citrus; -import com.consol.citrus.DefaultCitrusContextProvider; -import com.consol.citrus.DefaultTestCaseRunner; -import com.consol.citrus.TestCase; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.selenium.actions.CheckInputAction; -import com.consol.citrus.selenium.actions.ClickAction; -import com.consol.citrus.selenium.actions.FindElementAction; -import com.consol.citrus.selenium.actions.NavigateAction; -import com.consol.citrus.selenium.actions.SeleniumAction; -import com.consol.citrus.selenium.actions.SetInputAction; -import com.consol.citrus.selenium.actions.StartBrowserAction; -import com.consol.citrus.selenium.actions.StopBrowserAction; -import com.consol.citrus.selenium.endpoint.SeleniumBrowser; -import com.consol.citrus.selenium.endpoint.SeleniumBrowserConfiguration; +import org.citrusframework.Citrus; +import org.citrusframework.DefaultCitrusContextProvider; +import org.citrusframework.DefaultTestCaseRunner; +import org.citrusframework.TestCase; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.context.TestContext; +import org.citrusframework.selenium.actions.CheckInputAction; +import org.citrusframework.selenium.actions.ClickAction; +import org.citrusframework.selenium.actions.FindElementAction; +import org.citrusframework.selenium.actions.NavigateAction; +import org.citrusframework.selenium.actions.SeleniumAction; +import org.citrusframework.selenium.actions.SetInputAction; +import org.citrusframework.selenium.actions.StartBrowserAction; +import org.citrusframework.selenium.actions.StopBrowserAction; +import org.citrusframework.selenium.endpoint.SeleniumBrowser; +import org.citrusframework.selenium.endpoint.SeleniumBrowserConfiguration; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/WebServerConfiguration.java b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/WebServerConfiguration.java index 11af9065..ee3032d2 100644 --- a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/WebServerConfiguration.java +++ b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/WebServerConfiguration.java @@ -21,22 +21,23 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.container.AfterSuite; -import com.consol.citrus.container.SequenceAfterSuite; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.endpoint.EndpointAdapter; -import com.consol.citrus.endpoint.adapter.RequestDispatchingEndpointAdapter; -import com.consol.citrus.endpoint.adapter.StaticEndpointAdapter; -import com.consol.citrus.endpoint.adapter.mapping.HeaderMappingKeyExtractor; -import com.consol.citrus.endpoint.adapter.mapping.SimpleMappingStrategy; -import com.consol.citrus.http.message.HttpMessage; -import com.consol.citrus.http.message.HttpMessageHeaders; -import com.consol.citrus.http.server.HttpServer; -import com.consol.citrus.http.server.HttpServerBuilder; -import com.consol.citrus.message.Message; -import com.consol.citrus.selenium.endpoint.SeleniumBrowser; -import com.consol.citrus.selenium.endpoint.SeleniumBrowserBuilder; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.container.AfterSuite; +import org.citrusframework.container.SequenceAfterSuite; +import org.citrusframework.context.TestContext; +import org.citrusframework.endpoint.EndpointAdapter; +import org.citrusframework.endpoint.adapter.RequestDispatchingEndpointAdapter; +import org.citrusframework.endpoint.adapter.StaticEndpointAdapter; +import org.citrusframework.endpoint.adapter.mapping.HeaderMappingKeyExtractor; +import org.citrusframework.endpoint.adapter.mapping.SimpleMappingStrategy; +import org.citrusframework.http.message.HttpMessage; +import org.citrusframework.http.message.HttpMessageHeaders; +import org.citrusframework.http.server.HttpServer; +import org.citrusframework.http.server.HttpServerBuilder; +import org.citrusframework.message.Message; +import org.citrusframework.selenium.endpoint.SeleniumBrowser; +import org.citrusframework.selenium.endpoint.SeleniumBrowserBuilder; +import org.citrusframework.spi.Resources; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.selenium.page.UserFormPage; import org.openqa.selenium.remote.Browser; import org.springframework.beans.factory.config.ConfigurableBeanFactory; @@ -44,11 +45,10 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Scope; -import org.springframework.core.io.ClassPathResource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import static com.consol.citrus.selenium.actions.SeleniumActionBuilder.selenium; +import static org.citrusframework.selenium.actions.SeleniumActionBuilder.selenium; /** * @author Christoph Deppisch @@ -118,7 +118,7 @@ public EndpointAdapter indexPageHandler() { @Override protected Message handleMessageInternal(Message request) { try { - return new HttpMessage(FileUtils.readToString(new ClassPathResource("templates/index.html"))) + return new HttpMessage(FileUtils.readToString(Resources.fromClasspath("templates/index.html"))) .contentType(MediaType.TEXT_HTML_VALUE) .status(HttpStatus.OK); } catch (IOException e) { @@ -134,7 +134,7 @@ public EndpointAdapter userFormPageHandler() { @Override protected Message handleMessageInternal(Message request) { try { - return new HttpMessage(FileUtils.readToString(new ClassPathResource("templates/form.html"))) + return new HttpMessage(FileUtils.readToString(Resources.fromClasspath("templates/form.html"))) .contentType(MediaType.TEXT_HTML_VALUE) .status(HttpStatus.OK); } catch (IOException e) { diff --git a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/page/UserFormPage.java b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/page/UserFormPage.java index 0339e692..a7071eed 100644 --- a/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/page/UserFormPage.java +++ b/java/steps/yaks-selenium/src/test/java/org/citrusframework/yaks/selenium/page/UserFormPage.java @@ -17,10 +17,10 @@ package org.citrusframework.yaks.selenium.page; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.selenium.endpoint.SeleniumBrowser; -import com.consol.citrus.selenium.model.PageValidator; -import com.consol.citrus.selenium.model.WebPage; +import org.citrusframework.context.TestContext; +import org.citrusframework.selenium.endpoint.SeleniumBrowser; +import org.citrusframework.selenium.model.PageValidator; +import org.citrusframework.selenium.model.WebPage; import org.junit.Assert; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; diff --git a/java/steps/yaks-selenium/src/test/resources/cucumber.properties b/java/steps/yaks-selenium/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-selenium/src/test/resources/cucumber.properties +++ b/java/steps/yaks-selenium/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-selenium/src/test/resources/log4j2-test.xml b/java/steps/yaks-selenium/src/test/resources/log4j2-test.xml index 43b127c5..9f877f2f 100644 --- a/java/steps/yaks-selenium/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-selenium/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-standard/pom.xml b/java/steps/yaks-standard/pom.xml index bb3fe904..d3435172 100644 --- a/java/steps/yaks-standard/pom.xml +++ b/java/steps/yaks-standard/pom.xml @@ -35,11 +35,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-cucumber @@ -59,22 +59,22 @@ test - com.consol.citrus + org.citrusframework citrus-spring test - com.consol.citrus + org.citrusframework citrus-camel test - com.consol.citrus + org.citrusframework citrus-validation-json test - com.consol.citrus + org.citrusframework citrus-validation-text test diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/YaksSettings.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/YaksSettings.java index eff6e928..11c8b935 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/YaksSettings.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/YaksSettings.java @@ -25,7 +25,7 @@ import java.util.Locale; import java.util.Optional; -import com.consol.citrus.CitrusSettings; +import org.citrusframework.CitrusSettings; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/InjectEnvVarsHook.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/InjectEnvVarsHook.java index 58813ddd..afd5dc08 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/InjectEnvVarsHook.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/InjectEnvVarsHook.java @@ -19,10 +19,10 @@ import java.util.Optional; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.actions.AbstractTestAction; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.actions.AbstractTestAction; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.java.Before; import io.cucumber.java.Scenario; import org.citrusframework.yaks.YaksSettings; diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/TestFailureHook.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/TestFailureHook.java index 61dca679..4a00dbf1 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/TestFailureHook.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/hooks/TestFailureHook.java @@ -17,11 +17,11 @@ package org.citrusframework.yaks.hooks; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.actions.AbstractTestAction; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.actions.AbstractTestAction; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.cucumber.java.After; import io.cucumber.java.Scenario; import io.cucumber.java.Status; diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreator.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreator.java index f849056a..45bee268 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreator.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreator.java @@ -17,7 +17,7 @@ package org.citrusframework.yaks.message; -import com.consol.citrus.message.Message; +import org.citrusframework.message.Message; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreators.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreators.java index 0e0cfb87..3fdfde9f 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreators.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/message/MessageCreators.java @@ -23,9 +23,9 @@ import java.util.List; import java.util.Map; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.message.Message; -import org.springframework.util.ReflectionUtils; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.message.Message; +import org.citrusframework.util.ReflectionHelper; /** * @author Christoph Deppisch @@ -50,7 +50,11 @@ public Message createMessage(final String messageName) { final Message[] message = { null }; for (final Object messageCreator : pojoCreators) { - ReflectionUtils.doWithMethods(messageCreator.getClass(), method -> { + ReflectionHelper.doWithMethods(messageCreator.getClass(), method -> { + if (method.getAnnotationsByType(CreatesMessage.class).length == 0) { + return; + } + if (method.getAnnotation(CreatesMessage.class).value().equals(messageName)) { try { message[0] = (Message) method.invoke(messageCreator); @@ -58,7 +62,7 @@ public Message createMessage(final String messageName) { throw new CitrusRuntimeException("Unsupported message creator method: " + method.getName(), e); } } - }, method -> method.getAnnotationsByType(CreatesMessage.class).length > 0); + }); } if (message[0] == null) { diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/SystemOutTestReporter.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/SystemOutTestReporter.java index b3810fab..0e9b96c1 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/SystemOutTestReporter.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/SystemOutTestReporter.java @@ -21,11 +21,11 @@ import java.io.IOException; import java.io.OutputStreamWriter; -import com.consol.citrus.report.AbstractTestSuiteListener; -import com.consol.citrus.report.LoggingReporter; -import com.consol.citrus.report.OutputStreamReporter; -import com.consol.citrus.report.TestReporter; -import com.consol.citrus.report.TestResults; +import org.citrusframework.report.AbstractTestSuiteListener; +import org.citrusframework.report.LoggingReporter; +import org.citrusframework.report.OutputStreamReporter; +import org.citrusframework.report.TestReporter; +import org.citrusframework.report.TestResults; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/TestReporter.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/TestReporter.java index 2fd81a8c..ee5fe07d 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/TestReporter.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/report/TestReporter.java @@ -25,7 +25,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.consol.citrus.cucumber.CitrusReporter; +import org.citrusframework.cucumber.CitrusReporter; import io.cucumber.java.PendingException; import io.cucumber.plugin.event.EventPublisher; import io.cucumber.plugin.event.HookTestStep; diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/ComponentSteps.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/ComponentSteps.java index 73532518..424c4dd6 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/ComponentSteps.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/ComponentSteps.java @@ -17,9 +17,9 @@ package org.citrusframework.yaks.standard; -import com.consol.citrus.Citrus; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.message.DefaultMessageQueue; +import org.citrusframework.Citrus; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.message.DefaultMessageQueue; import io.cucumber.java.en.Given; /** diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/EndpointSteps.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/EndpointSteps.java index 77abc12b..e1e1c2b1 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/EndpointSteps.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/EndpointSteps.java @@ -17,18 +17,18 @@ package org.citrusframework.yaks.standard; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.endpoint.Endpoint; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.server.Server; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.endpoint.Endpoint; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.server.Server; import io.cucumber.java.en.Given; -import static com.consol.citrus.actions.PurgeEndpointAction.Builder.purgeEndpoints; -import static com.consol.citrus.actions.StartServerAction.Builder.start; -import static com.consol.citrus.actions.StopServerAction.Builder.stop; +import static org.citrusframework.actions.PurgeEndpointAction.Builder.purgeEndpoints; +import static org.citrusframework.actions.StartServerAction.Builder.start; +import static org.citrusframework.actions.StopServerAction.Builder.stop; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/MessagingSteps.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/MessagingSteps.java index 115dd4e4..1a090123 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/MessagingSteps.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/MessagingSteps.java @@ -20,13 +20,13 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.CitrusSettings; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.message.DefaultMessage; -import com.consol.citrus.message.Message; +import org.citrusframework.Citrus; +import org.citrusframework.CitrusSettings; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.message.DefaultMessage; +import org.citrusframework.message.Message; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.en.And; @@ -36,8 +36,8 @@ import org.citrusframework.yaks.message.MessageCreator; import org.citrusframework.yaks.message.MessageCreators; -import static com.consol.citrus.actions.ReceiveMessageAction.Builder.receive; -import static com.consol.citrus.actions.SendMessageAction.Builder.send; +import static org.citrusframework.actions.ReceiveMessageAction.Builder.receive; +import static org.citrusframework.actions.SendMessageAction.Builder.send; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/StandardSteps.java b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/StandardSteps.java index 925eb2d3..1edb02b3 100644 --- a/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/StandardSteps.java +++ b/java/steps/yaks-standard/src/main/java/org/citrusframework/yaks/standard/StandardSteps.java @@ -21,17 +21,17 @@ import java.time.Duration; import java.util.Map; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.util.FileUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; -import static com.consol.citrus.actions.EchoAction.Builder.echo; -import static com.consol.citrus.actions.LoadPropertiesAction.Builder.load; -import static com.consol.citrus.actions.SleepAction.Builder.sleep; +import static org.citrusframework.actions.EchoAction.Builder.echo; +import static org.citrusframework.actions.LoadPropertiesAction.Builder.load; +import static org.citrusframework.actions.SleepAction.Builder.sleep; public class StandardSteps { diff --git a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/hooks/InjectEnvVarsHookTest.java b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/hooks/InjectEnvVarsHookTest.java index bf608d94..ccb95bb1 100644 --- a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/hooks/InjectEnvVarsHookTest.java +++ b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/hooks/InjectEnvVarsHookTest.java @@ -19,11 +19,11 @@ import java.util.Optional; -import com.consol.citrus.DefaultTestCaseRunner; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusAnnotations; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.context.TestContextFactory; +import org.citrusframework.DefaultTestCaseRunner; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusAnnotations; +import org.citrusframework.context.TestContext; +import org.citrusframework.context.TestContextFactory; import org.assertj.core.api.Assertions; import org.citrusframework.yaks.YaksSettings; import org.citrusframework.yaks.YaksVariableNames; diff --git a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/BarMessageCreator.java b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/BarMessageCreator.java index 17bf8e00..76b05b36 100644 --- a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/BarMessageCreator.java +++ b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/BarMessageCreator.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.message; -import com.consol.citrus.message.DefaultMessage; -import com.consol.citrus.message.Message; +import org.citrusframework.message.DefaultMessage; +import org.citrusframework.message.Message; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/PojoMessageCreator.java b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/PojoMessageCreator.java index c3d12039..4953eca2 100644 --- a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/PojoMessageCreator.java +++ b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/message/PojoMessageCreator.java @@ -17,8 +17,8 @@ package org.citrusframework.yaks.message; -import com.consol.citrus.message.DefaultMessage; -import com.consol.citrus.message.Message; +import org.citrusframework.message.DefaultMessage; +import org.citrusframework.message.Message; /** * @author Christoph Deppisch diff --git a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/standard/EndpointConfiguration.java b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/standard/EndpointConfiguration.java index c990369b..0dbc5764 100644 --- a/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/standard/EndpointConfiguration.java +++ b/java/steps/yaks-standard/src/test/java/org/citrusframework/yaks/standard/EndpointConfiguration.java @@ -17,11 +17,11 @@ package org.citrusframework.yaks.standard; -import com.consol.citrus.camel.endpoint.CamelSyncEndpoint; -import com.consol.citrus.camel.endpoint.CamelSyncEndpointConfiguration; -import com.consol.citrus.endpoint.direct.DirectEndpoint; -import com.consol.citrus.endpoint.direct.DirectEndpoints; -import com.consol.citrus.message.DefaultMessage; +import org.citrusframework.camel.endpoint.CamelSyncEndpoint; +import org.citrusframework.camel.endpoint.CamelSyncEndpointConfiguration; +import org.citrusframework.endpoint.direct.DirectEndpoint; +import org.citrusframework.endpoint.direct.DirectEndpoints; +import org.citrusframework.message.DefaultMessage; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.spring.SpringCamelContext; diff --git a/java/steps/yaks-standard/src/test/resources/cucumber.properties b/java/steps/yaks-standard/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-standard/src/test/resources/cucumber.properties +++ b/java/steps/yaks-standard/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-standard/src/test/resources/log4j2-test.xml b/java/steps/yaks-standard/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-standard/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-standard/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/steps/yaks-testcontainers/pom.xml b/java/steps/yaks-testcontainers/pom.xml index c7eaf8a2..0ed2a74b 100644 --- a/java/steps/yaks-testcontainers/pom.xml +++ b/java/steps/yaks-testcontainers/pom.xml @@ -89,7 +89,7 @@ - com.consol.citrus + org.citrusframework citrus-base @@ -100,7 +100,7 @@ test - com.consol.citrus + org.citrusframework citrus-cucumber test @@ -154,7 +154,7 @@ test - com.consol.citrus + org.citrusframework citrus-validation-text test diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/DatabaseContainerSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/DatabaseContainerSteps.java index 42dc6f4e..ef51c73f 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/DatabaseContainerSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/DatabaseContainerSteps.java @@ -19,10 +19,10 @@ import java.io.IOException; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; +import org.citrusframework.util.FileUtils; import io.cucumber.java.en.Given; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSettings.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSettings.java index 9f91a247..531bf0fc 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSettings.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSettings.java @@ -27,7 +27,7 @@ public class KafkaSettings { private static final String KAFKA_VERSION_PROPERTY = KAFKA_PROPERTY_PREFIX + "version"; private static final String KAFKA_VERSION_ENV = KAFKA_ENV_PREFIX + "KAFKA_VERSION"; - private static final String KAFKA_VERSION_DEFAULT = "7.0.1"; + private static final String KAFKA_VERSION_DEFAULT = "7.5.1"; private static final String KAFKA_IMAGE_NAME_PROPERTY = KAFKA_PROPERTY_PREFIX + "image.name"; private static final String KAFKA_IMAGE_NAME_ENV = KAFKA_ENV_PREFIX + "KAFKA_IMAGE_NAME"; diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java index 710fae9f..85c0a30f 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/KafkaSteps.java @@ -21,11 +21,11 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -34,7 +34,7 @@ import org.testcontainers.containers.KafkaContainer; import org.testcontainers.utility.DockerImageName; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static java.time.temporal.ChronoUnit.SECONDS; public class KafkaSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSettings.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSettings.java index b1ee71c1..c71f864e 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSettings.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSettings.java @@ -27,7 +27,7 @@ public class LocalStackSettings { private static final String VERSION_PROPERTY = LOCALSTACK_PROPERTY_PREFIX + "version"; private static final String VERSION_ENV = LOCALSTACK_ENV_PREFIX + "VERSION"; - public static final String VERSION_DEFAULT = "1.4.0"; + public static final String VERSION_DEFAULT = "2.3.2"; private static final String STARTUP_TIMEOUT_PROPERTY = LOCALSTACK_PROPERTY_PREFIX + "startup.timeout"; private static final String STARTUP_TIMEOUT_ENV = LOCALSTACK_ENV_PREFIX + "STARTUP_TIMEOUT"; diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java index be5eb4e1..2631467e 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/LocalStackSteps.java @@ -27,11 +27,11 @@ import java.util.Optional; import java.util.Set; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -43,7 +43,7 @@ import org.citrusframework.yaks.testcontainers.aws2.AWS2Container; import org.testcontainers.containers.wait.strategy.Wait; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static java.time.temporal.ChronoUnit.SECONDS; public class LocalStackSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java index f0b73ca6..2e65425c 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/MongoDBSteps.java @@ -21,11 +21,11 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -35,7 +35,7 @@ import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.utility.DockerImageName; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static java.time.temporal.ChronoUnit.SECONDS; public class MongoDBSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java index 6c6cc0d6..69404114 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/PostgreSQLSteps.java @@ -22,12 +22,12 @@ import java.util.Map; import javax.script.ScriptException; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; +import org.citrusframework.exceptions.CitrusRuntimeException; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -40,7 +40,7 @@ import org.testcontainers.jdbc.JdbcDatabaseDelegate; import org.testcontainers.utility.DockerImageName; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static java.time.temporal.ChronoUnit.SECONDS; public class PostgreSQLSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSettings.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSettings.java index 39cc973a..11a19c16 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSettings.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSettings.java @@ -27,7 +27,7 @@ public class RedpandaSettings { private static final String REDPANDA_VERSION_PROPERTY = REDPANDA_PROPERTY_PREFIX + "version"; private static final String REDPANDA_VERSION_ENV = REDPANDA_ENV_PREFIX + "REDPANDA_VERSION"; - private static final String REDPANDA_VERSION_DEFAULT = "v22.2.1"; + private static final String REDPANDA_VERSION_DEFAULT = "v23.1.19"; private static final String REDPANDA_IMAGE_NAME_PROPERTY = REDPANDA_PROPERTY_PREFIX + "image.name"; private static final String REDPANDA_IMAGE_NAME_ENV = REDPANDA_ENV_PREFIX + "REDPANDA_IMAGE_NAME"; diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java index 3fa62cff..d91684e1 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/RedpandaSteps.java @@ -21,11 +21,11 @@ import java.util.HashMap; import java.util.Map; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; -import com.consol.citrus.context.TestContext; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; +import org.citrusframework.context.TestContext; import io.cucumber.datatable.DataTable; import io.cucumber.java.Before; import io.cucumber.java.Scenario; @@ -35,7 +35,7 @@ import org.testcontainers.redpanda.RedpandaContainer; import org.testcontainers.utility.DockerImageName; -import static com.consol.citrus.container.FinallySequence.Builder.doFinally; +import static org.citrusframework.container.FinallySequence.Builder.doFinally; import static java.time.temporal.ChronoUnit.SECONDS; public class RedpandaSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/TestContainersSteps.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/TestContainersSteps.java index bbed0e3c..7dbb7af3 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/TestContainersSteps.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/TestContainersSteps.java @@ -17,10 +17,10 @@ package org.citrusframework.yaks.testcontainers; -import com.consol.citrus.Citrus; -import com.consol.citrus.TestCaseRunner; -import com.consol.citrus.annotations.CitrusFramework; -import com.consol.citrus.annotations.CitrusResource; +import org.citrusframework.Citrus; +import org.citrusframework.TestCaseRunner; +import org.citrusframework.annotations.CitrusFramework; +import org.citrusframework.annotations.CitrusResource; import io.cucumber.java.en.Given; public class TestContainersSteps { diff --git a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/aws2/AWS2Container.java b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/aws2/AWS2Container.java index 1754640b..11d8fa00 100644 --- a/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/aws2/AWS2Container.java +++ b/java/steps/yaks-testcontainers/src/main/java/org/citrusframework/yaks/testcontainers/aws2/AWS2Container.java @@ -27,7 +27,7 @@ import java.util.Set; import java.util.stream.Collectors; -import com.consol.citrus.exceptions.CitrusRuntimeException; +import org.citrusframework.exceptions.CitrusRuntimeException; import org.citrusframework.yaks.testcontainers.LocalStackSettings; import org.testcontainers.containers.GenericContainer; import org.testcontainers.containers.wait.strategy.Wait; diff --git a/java/steps/yaks-testcontainers/src/test/java/org/citrusframework/yaks/testcontainers/TestContainersFeature_IT.java b/java/steps/yaks-testcontainers/src/test/java/org/citrusframework/yaks/testcontainers/TestContainersFeature_IT.java index d9b96c2d..e516b38e 100644 --- a/java/steps/yaks-testcontainers/src/test/java/org/citrusframework/yaks/testcontainers/TestContainersFeature_IT.java +++ b/java/steps/yaks-testcontainers/src/test/java/org/citrusframework/yaks/testcontainers/TestContainersFeature_IT.java @@ -32,7 +32,7 @@ "org.citrusframework.yaks.jdbc", "org.citrusframework.yaks.kafka" }, - plugin = { "pretty", "com.consol.citrus.cucumber.CitrusReporter" } + plugin = { "pretty", "org.citrusframework.cucumber.CitrusReporter" } ) public class TestContainersFeature_IT { } diff --git a/java/steps/yaks-testcontainers/src/test/resources/cucumber.properties b/java/steps/yaks-testcontainers/src/test/resources/cucumber.properties index 8cbb7b8f..68850132 100644 --- a/java/steps/yaks-testcontainers/src/test/resources/cucumber.properties +++ b/java/steps/yaks-testcontainers/src/test/resources/cucumber.properties @@ -15,5 +15,5 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.publish.quiet=true diff --git a/java/steps/yaks-testcontainers/src/test/resources/log4j2-test.xml b/java/steps/yaks-testcontainers/src/test/resources/log4j2-test.xml index a99b2ff0..8f93dbef 100644 --- a/java/steps/yaks-testcontainers/src/test/resources/log4j2-test.xml +++ b/java/steps/yaks-testcontainers/src/test/resources/log4j2-test.xml @@ -33,7 +33,7 @@ - + diff --git a/java/tools/maven/yaks-maven-extension/src/test/resources/log4j2-test.xml b/java/tools/maven/yaks-maven-extension/src/test/resources/log4j2-test.xml index e0284c06..dc50e4b4 100644 --- a/java/tools/maven/yaks-maven-extension/src/test/resources/log4j2-test.xml +++ b/java/tools/maven/yaks-maven-extension/src/test/resources/log4j2-test.xml @@ -32,7 +32,7 @@ - + diff --git a/java/tools/yaks-jbang/pom.xml b/java/tools/yaks-jbang/pom.xml index 672ca3e5..e8b55650 100644 --- a/java/tools/yaks-jbang/pom.xml +++ b/java/tools/yaks-jbang/pom.xml @@ -35,11 +35,11 @@ - com.consol.citrus + org.citrusframework citrus-base - com.consol.citrus + org.citrusframework citrus-main @@ -59,17 +59,9 @@ - - org.slf4j - slf4j-api - - - org.apache.logging.log4j - log4j-core - org.apache.logging.log4j - log4j-slf4j-impl + log4j-slf4j2-impl diff --git a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Init.java b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Init.java index 191be37e..e3dc290b 100644 --- a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Init.java +++ b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Init.java @@ -23,9 +23,8 @@ import java.nio.file.Path; import java.util.Stack; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.jbang.YaksJBangMain; -import org.springframework.util.StreamUtils; import picocli.CommandLine.Command; import picocli.CommandLine.Option; import picocli.CommandLine.Parameters; @@ -58,7 +57,7 @@ public Integer call() throws Exception { System.out.println("Error: Unsupported file type: " + ext); return 1; } - content = StreamUtils.copyToString(is, StandardCharsets.UTF_8); + content = FileUtils.readToString(is, StandardCharsets.UTF_8); } if (!directory.equals(".")) { diff --git a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/ListTests.java b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/ListTests.java index dde82661..4a910322 100644 --- a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/ListTests.java +++ b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/ListTests.java @@ -24,7 +24,7 @@ import java.util.Arrays; import java.util.List; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.util.FileUtils; import com.fasterxml.jackson.databind.JsonNode; import com.github.freva.asciitable.AsciiTable; import com.github.freva.asciitable.Column; diff --git a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Run.java b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Run.java index f6ba72ae..9c3f4d4e 100644 --- a/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Run.java +++ b/java/tools/yaks-jbang/src/main/java/org/citrusframework/yaks/jbang/commands/Run.java @@ -35,12 +35,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import com.consol.citrus.CitrusInstanceManager; -import com.consol.citrus.cucumber.CucumberTestEngine; -import com.consol.citrus.main.TestRunConfiguration; -import com.consol.citrus.report.TestReporter; -import com.consol.citrus.report.TestResults; -import com.consol.citrus.util.FileUtils; +import org.citrusframework.CitrusInstanceManager; +import org.citrusframework.cucumber.CucumberTestEngine; +import org.citrusframework.main.TestRunConfiguration; +import org.citrusframework.report.TestReporter; +import org.citrusframework.report.TestResults; +import org.citrusframework.util.FileUtils; import org.citrusframework.yaks.jbang.YaksJBangMain; import picocli.CommandLine.Command; import picocli.CommandLine.Parameters; diff --git a/java/tools/yaks-jbang/src/main/resources/cucumber.properties b/java/tools/yaks-jbang/src/main/resources/cucumber.properties index 43961177..cf4deb58 100644 --- a/java/tools/yaks-jbang/src/main/resources/cucumber.properties +++ b/java/tools/yaks-jbang/src/main/resources/cucumber.properties @@ -15,7 +15,7 @@ # limitations under the License. # -cucumber.object-factory=com.consol.citrus.cucumber.backend.CitrusObjectFactory +cucumber.object-factory=org.citrusframework.cucumber.backend.CitrusObjectFactory cucumber.glue=org.citrusframework.yaks cucumber.plugin=pretty cucumber.publish.quiet=true