From da8b7c09e92eb154187a13d659d19eabc9efa2b9 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Mon, 16 Dec 2024 18:09:25 -0500 Subject: [PATCH 1/6] [sonataflow-images] [kogito-images] Fix #2817 - Disable debug on e2e tests Signed-off-by: Ricardo Zanini --- .../added/kogito-app-launch.sh | 14 +++++++++----- .../features/kogito-data-index-common.feature | 4 ++-- .../features/kogito-data-index-ephemeral.feature | 4 ++-- .../added/kogito-app-launch.sh | 14 +++++++++----- .../kogito-common-postresql-services.feature | 2 +- .../features/kogito-data-index-common.feature | 4 ++-- .../features/kogito-data-index-postgresql.feature | 2 +- .../kogito-jit-runner/added/kogito-app-launch.sh | 14 +++++++++----- .../tests/features/kogito-jit-runner.feature | 4 ++-- .../added/kogito-app-launch.sh | 12 ++++++++---- .../kogito-jobs-service-all-in-one.feature | 6 +++--- .../features/kogito-jobs-service-common.feature | 2 +- .../added/kogito-app-launch.sh | 12 ++++++++---- .../features/kogito-jobs-service-common.feature | 2 +- .../features/kogito-jobs-service-ephemeral.feature | 2 +- .../added/kogito-app-launch.sh | 12 ++++++++---- .../features/kogito-jobs-service-common.feature | 2 +- .../kogito-jobs-service-postgresql.feature | 2 +- .../tests/features/sonataflow-builder.feature | 7 +++---- .../runtime/common/added/run-app-devmode.sh | 13 +++++++++---- .../tests/features/sonataflow-devmode.feature | 14 ++++---------- 21 files changed, 85 insertions(+), 63 deletions(-) diff --git a/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh index aa15cda2106..83dea09ddb2 100644 --- a/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh +++ b/packages/kogito-data-index-ephemeral-image/resources/modules/kogito-data-index-ephemeral/added/kogito-app-launch.sh @@ -42,9 +42,13 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Djava.library.path="${KOGITO_HOME}"/lib \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Djava.library.path=\"${KOGITO_HOME}/lib\" \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature index d5a359d17dd..47acf03babc 100644 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature +++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature @@ -23,12 +23,12 @@ Feature: Kogito-data-index common feature. Scenario: Verify if the debug is correctly enabled and test default http port When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 Scenario: check if a provided data index quarkus profile is correctly set on data index When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | KOGITO_DATA_INDEX_QUARKUS_PROFILE | http-events-support | Then container log should contain -Dquarkus.profile=http-events-support \ No newline at end of file diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature index f7e817c3c16..380e940926e 100644 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature +++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature @@ -30,7 +30,7 @@ Feature: Kogito-data-index ephemeral postgresql feature. Scenario: verify if of kogito-data-index-ephemeral container is correctly started When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar And container log should contain Embedded Postgres started at port And container log should not contain Application failed to start @@ -38,5 +38,5 @@ Feature: Kogito-data-index ephemeral postgresql feature. Scenario: check if the default quarkus profile is correctly set on data index When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then available container log should contain -Dquarkus.profile=http-events-support diff --git a/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh index ec77a25695a..d106377e204 100644 --- a/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh +++ b/packages/kogito-data-index-postgresql-image/resources/modules/kogito-data-index-postgresql/added/kogito-app-launch.sh @@ -42,8 +42,12 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Djava.library.path="${KOGITO_HOME}"/lib \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar \ No newline at end of file +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_DATA_INDEX_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Djava.library.path=\"${KOGITO_HOME}/lib\" \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature index a4146f52bb7..a5f7e0f570d 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature @@ -23,7 +23,7 @@ Feature: Kogito-data-index postgresql feature. Scenario: verify if of container is correctly started with postgresql parameters When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://localhost:5432/quarkus | | QUARKUS_DATASOURCE_USERNAME | kogito | | QUARKUS_DATASOURCE_PASSWORD | s3cr3t | diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature index fae736f08d5..594f36f6fa0 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature @@ -23,12 +23,12 @@ Feature: Kogito-data-index common feature. Scenario: Verify if the debug is correctly enabled and test default http port When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 Scenario: check if a provided data index quarkus profile is correctly set on data index When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | KOGITO_DATA_INDEX_QUARKUS_PROFILE | http-events-support | Then container log should contain -Dquarkus.profile=http-events-support \ No newline at end of file diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature index ced19dc790a..28039e8cd51 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-postgresql.feature @@ -31,5 +31,5 @@ Feature: Kogito-data-index postgresql feature. Scenario: check if the default quarkus profile is correctly set on data index When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Dquarkus.profile=kafka-events-support \ No newline at end of file diff --git a/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh index f519f07d4eb..afd40aae86e 100644 --- a/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh +++ b/packages/kogito-jit-runner-image/resources/modules/kogito-jit-runner/added/kogito-app-launch.sh @@ -41,8 +41,12 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Djava.library.path="${KOGITO_HOME}"/lib \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar \ No newline at end of file +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Djava.library.path=\"${KOGITO_HOME}/lib\" \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature index 4c6e51aed3b..94a77aace81 100644 --- a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature +++ b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature @@ -31,13 +31,13 @@ Feature: Kogito-jit-runner feature. Scenario: Verify if the debug is correctly enabled and test default http port When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar Scenario: Verify that jit runner can evaluate a DMN model with a context When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then check that page is served | property | value | | port | 8080 | diff --git a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh index 43fc15e1c50..447dbbae762 100644 --- a/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh +++ b/packages/kogito-jobs-service-allinone-image/resources/modules/kogito-jobs-service-all-in-one/added/kogito-app-launch.sh @@ -52,7 +52,11 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/${jobs_service_flavor}/quarkus-app/quarkus-run.jar +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/${jobs_service_flavor}/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature index 8d897bdf35f..896311a470c 100644 --- a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature +++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature @@ -36,7 +36,7 @@ Feature: Kogito-jobs-service-all-in-one feature. Scenario: Verify if the debug is correctly enabled with the ephemeral jar When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar And container log should contain started in And container log should not contain Application failed to start @@ -44,7 +44,7 @@ Feature: Kogito-jobs-service-all-in-one feature. Scenario: verify if the container is started with invalid jobs-service flavor When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | JOBS_SERVICE_PERSISTENCE | something | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar And container log should contain something is not supported, the allowed flavors are [ephemeral postgresql], defaulting to ephemeral @@ -52,7 +52,7 @@ Feature: Kogito-jobs-service-all-in-one feature. Scenario: verify if container starts as expected When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_LOG_LEVEL | DEBUG | | JOBS_SERVICE_PERSISTENCE | postgresql | | QUARKUS_DATASOURCE_DB_KIND | postgresql | diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature index 81743a49b80..b1be21467e9 100644 --- a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -25,7 +25,7 @@ Feature: Kogito-jobs-service common feature. Scenario: verify if the events is correctly enabled When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar diff --git a/packages/kogito-jobs-service-ephemeral-image/resources/modules/kogito-jobs-service-ephemeral/added/kogito-app-launch.sh b/packages/kogito-jobs-service-ephemeral-image/resources/modules/kogito-jobs-service-ephemeral/added/kogito-app-launch.sh index 0f470cac6d3..43295a8e7e6 100644 --- a/packages/kogito-jobs-service-ephemeral-image/resources/modules/kogito-jobs-service-ephemeral/added/kogito-app-launch.sh +++ b/packages/kogito-jobs-service-ephemeral-image/resources/modules/kogito-jobs-service-ephemeral/added/kogito-app-launch.sh @@ -42,7 +42,11 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature index 56a431c9c5f..3550879c56d 100644 --- a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -25,7 +25,7 @@ Feature: Kogito-jobs-service common feature. Scenario: verify if the events is correctly enabled When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature index f9458b09d65..5e0848de858 100644 --- a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature +++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature @@ -35,7 +35,7 @@ Feature: Kogito-jobs-service-ephemeral feature. Scenario: Verify if the debug is correctly enabled with the ephemeral jar When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar And container log should contain started in And container log should not contain Application failed to start diff --git a/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh index 0f470cac6d3..43295a8e7e6 100644 --- a/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh +++ b/packages/kogito-jobs-service-postgresql-image/resources/modules/kogito-jobs-service-postgresql/added/kogito-app-launch.sh @@ -42,7 +42,11 @@ source "${KOGITO_HOME}"/launch/configure.sh DYNAMIC_RESOURCES_OPTS="$(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/java-default-options) $(${JBOSS_CONTAINER_JAVA_JVM_MODULE}/debug-options)" # shellcheck disable=SC2086 -exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ - -Dquarkus.http.host=0.0.0.0 \ - -Dquarkus.http.port=8080 \ - -jar "${KOGITO_HOME}"/bin/quarkus-app/quarkus-run.jar +CMD="exec java ${SHOW_JVM_SETTINGS} ${DYNAMIC_RESOURCES_OPTS} ${JAVA_OPTIONS} ${KOGITO_JOBS_PROPS} ${CUSTOM_TRUSTSTORE_ARGS} \ +-Dquarkus.http.host=0.0.0.0 \ +-Dquarkus.http.port=8080 \ +-jar \"${KOGITO_HOME}/bin/quarkus-app/quarkus-run.jar\"" + +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature index 6c9ad4a7738..000ee756234 100644 --- a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -25,7 +25,7 @@ Feature: Kogito-jobs-service common feature. Scenario: verify if the events is correctly enabled When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature index c8aa91d8fb8..3b6237a0297 100644 --- a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature +++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature @@ -35,7 +35,7 @@ Feature: Kogito-jobs-service-postgresql feature. Scenario: verify if container starts as expected When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_LOG_LEVEL | DEBUG | | QUARKUS_DATASOURCE_DB_KIND | postgresql | | QUARKUS_DATASOURCE_USERNAME | test | diff --git a/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature b/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature index fefd17bc48f..0ab07a2bff6 100644 --- a/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature +++ b/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature @@ -4,7 +4,7 @@ Feature: Serverless Workflow builder images Scenario: Verify that the application is built and started correctly When container is started with command bash -c '/home/kogito/launch/build-app.sh && java -jar target/quarkus-app/quarkus-run.jar' | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then check that page is served | property | value | | port | 8080 | @@ -20,7 +20,7 @@ Feature: Serverless Workflow builder images Scenario: Verify that the application is built and started correctly when QUARKUS_EXTENSIONS env is used When container is started with command bash -c '/home/kogito/launch/build-app.sh && java -jar target/quarkus-app/quarkus-run.jar' | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_EXTENSIONS | io.quarkus:quarkus-elytron-security-jdbc | Then check that page is served | property | value | @@ -29,8 +29,7 @@ Feature: Serverless Workflow builder images | wait | 480 | | request_method | GET | | expected_status_code | 200 | - And container log should contain -Duser.home=/home/kogito - And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed + And container log should match regex Extension io\.quarkus:quarkus-elytron-security-jdbc.* has been installed And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kie-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health diff --git a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/added/run-app-devmode.sh b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/added/run-app-devmode.sh index 6f5ec36109e..93a9bffb7d2 100755 --- a/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/added/run-app-devmode.sh +++ b/packages/sonataflow-devmode-image/resources/modules/sonataflow/devmode/runtime/common/added/run-app-devmode.sh @@ -43,11 +43,16 @@ if [ ! -z "${QUARKUS_EXTENSIONS}" ]; then offline_param="" fi -"${MAVEN_HOME}"/bin/mvn -B ${MAVEN_ARGS_APPEND} \ +CMD="\"${MAVEN_HOME}\"/bin/mvn -B ${MAVEN_ARGS_APPEND} \ ${offline_param} \ - -s "${MAVEN_SETTINGS_PATH}" \ + -s \"${MAVEN_SETTINGS_PATH}\" \ -DskipTests \ -Dquarkus.http.host=0.0.0.0 \ -Dquarkus.test.continuous-testing=${QUARKUS_CONTINUOUS_TESTING:-disabled} \ - -Dquarkus.analytics.disabled=${QUARKUS_ANALYTICS_DISABLED:true} \ - clean compile quarkus:dev \ No newline at end of file + -Dquarkus.analytics.disabled=${QUARKUS_ANALYTICS_DISABLED:-true} \ + clean compile quarkus:dev" + +# Prints the command before executing for troubleshooting purposes +log_info "Running application start mvn command" +echo "$CMD" +eval "$CMD" diff --git a/packages/sonataflow-devmode-image/test-resources/tests/features/sonataflow-devmode.feature b/packages/sonataflow-devmode-image/test-resources/tests/features/sonataflow-devmode.feature index f9abddb709d..f381ebb10cc 100644 --- a/packages/sonataflow-devmode-image/test-resources/tests/features/sonataflow-devmode.feature +++ b/packages/sonataflow-devmode-image/test-resources/tests/features/sonataflow-devmode.feature @@ -4,7 +4,7 @@ Feature: Serverless Workflow devmode images Scenario: Verify if container starts in devmode by default When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | Then check that page is served | property | value | | port | 8080 | @@ -12,8 +12,6 @@ Feature: Serverless Workflow devmode images | wait | 480 | | request_method | GET | | expected_status_code | 200 | - And container log should contain -Duser.home=/home/kogito -o - And container log should contain -Dquarkus.test.continuous-testing=disabled And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kie-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health @@ -25,7 +23,7 @@ Feature: Serverless Workflow devmode images Scenario: Verify if container starts correctly when continuous testing is enabled When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_CONTINUOUS_TESTING | enabled | Then check that page is served | property | value | @@ -34,14 +32,12 @@ Feature: Serverless Workflow devmode images | wait | 480 | | request_method | GET | | expected_status_code | 200 | - And container log should contain -Duser.home=/home/kogito - And container log should not contain /bin/mvn -B -X --batch-mode -o And container log should contain -Dquarkus.test.continuous-testing=enabled Scenario: Verify if container starts correctly when QUARKUS_EXTENSIONS env is used When container is started with env | variable | value | - | SCRIPT_DEBUG | true | + | SCRIPT_DEBUG | false | | QUARKUS_EXTENSIONS | io.quarkus:quarkus-elytron-security-jdbc | Then check that page is served | property | value | @@ -50,9 +46,7 @@ Feature: Serverless Workflow devmode images | wait | 960 | | request_method | GET | | expected_status_code | 200 | - And container log should contain -Duser.home=/home/kogito - And container log should not contain /bin/mvn -B -X --batch-mode -o - And container log should contain Extension io.quarkus:quarkus-elytron-security-jdbc has been installed + And container log should match regex Extension io\.quarkus:quarkus-elytron-security-jdbc.* has been installed And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kie-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health From b7f2947ed811dc13bade32d8d173b6106946a99a Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Mon, 16 Dec 2024 18:50:34 -0500 Subject: [PATCH 2/6] Fixing quotes, remove unnecessary checks in the builder image Signed-off-by: Ricardo Zanini --- .../tests/features/kogito-data-index-common.feature | 2 +- .../tests/features/kogito-data-index-ephemeral.feature | 2 +- .../tests/features/kogito-data-index-common.feature | 2 +- .../test-resources/tests/features/kogito-jit-runner.feature | 2 +- .../test-resources/tests/features/sonataflow-builder.feature | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature index 47acf03babc..02f510c7fac 100644 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature +++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature @@ -24,7 +24,7 @@ Feature: Kogito-data-index common feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 + Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 Scenario: check if a provided data index quarkus profile is correctly set on data index When container is started with env diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature index 380e940926e..ec8af25708d 100644 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature +++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature @@ -31,7 +31,7 @@ Feature: Kogito-data-index ephemeral postgresql feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar And container log should contain Embedded Postgres started at port And container log should not contain Application failed to start diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature index 594f36f6fa0..ef43b54cd0c 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature @@ -24,7 +24,7 @@ Feature: Kogito-data-index common feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 + Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 Scenario: check if a provided data index quarkus profile is correctly set on data index When container is started with env diff --git a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature index 94a77aace81..66c5ee9c403 100644 --- a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature +++ b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature @@ -32,7 +32,7 @@ Feature: Kogito-jit-runner feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar Scenario: Verify that jit runner can evaluate a DMN model with a context When container is started with env diff --git a/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature b/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature index 0ab07a2bff6..728cb34f4e1 100644 --- a/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature +++ b/packages/sonataflow-builder-image/test-resources/tests/features/sonataflow-builder.feature @@ -12,7 +12,6 @@ Feature: Serverless Workflow builder images | wait | 480 | | request_method | GET | | expected_status_code | 200 | - And container log should contain -Duser.home=/home/kogito And container log should match regex Installed features:.*kogito-serverless-workflow And container log should match regex Installed features:.*kie-addon-knative-eventing-extension And container log should match regex Installed features:.*smallrye-health From 06781a34d04556facc066774a38ae276404b69fb Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Tue, 17 Dec 2024 15:48:53 -0500 Subject: [PATCH 3/6] Fix quotes Signed-off-by: Ricardo Zanini --- .../features/kogito-data-index-common.feature | 34 ------------------- .../kogito-data-index-ephemeral.feature | 8 ++--- .../features/kogito-data-index-common.feature | 4 +-- .../tests/features/kogito-jit-runner.feature | 4 +-- .../kogito-jobs-service-all-in-one.feature | 6 ++-- .../kogito-jobs-service-ephemeral.feature | 2 +- .../kogito-jobs-service-postgresql.feature | 4 +-- 7 files changed, 14 insertions(+), 48 deletions(-) delete mode 100644 packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature deleted file mode 100644 index 02f510c7fac..00000000000 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-common.feature +++ /dev/null @@ -1,34 +0,0 @@ -# -# 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. -# - -@docker.io/apache/incubator-kie-kogito-data-index-ephemeral -Feature: Kogito-data-index common feature. - - Scenario: Verify if the debug is correctly enabled and test default http port - When container is started with env - | variable | value | - | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 - - Scenario: check if a provided data index quarkus profile is correctly set on data index - When container is started with env - | variable | value | - | SCRIPT_DEBUG | false | - | KOGITO_DATA_INDEX_QUARKUS_PROFILE | http-events-support | - Then container log should contain -Dquarkus.profile=http-events-support \ No newline at end of file diff --git a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature index ec8af25708d..4929ab7d171 100644 --- a/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature +++ b/packages/kogito-data-index-ephemeral-image/test-resources/tests/features/kogito-data-index-ephemeral.feature @@ -17,7 +17,7 @@ # under the License. # @docker.io/apache/incubator-kie-kogito-data-index-ephemeral -Feature: Kogito-data-index ephemeral postgresql feature. +Feature: Kogito-data-index ephemeral feature. Scenario: verify if all labels are correctly set on kogito-data-index-ephemeral image Given image is built @@ -27,11 +27,11 @@ Feature: Kogito-data-index ephemeral postgresql feature. And the image should contain label io.k8s.display-name with value Kogito Data Index Service - ephemeral PostgreSQL And the image should contain label io.openshift.tags with value kogito,data-index,data-index-ephemeral - Scenario: verify if of kogito-data-index-ephemeral container is correctly started + Scenario: verify if kogito-data-index-ephemeral container is correctly started When container is started with env | variable | value | - | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + | SCRIPT_DEBUG | false | + Then container log should match regex exec java.*-Djava\.library\.path="/home/kogito/lib" -Dquarkus\.http\.host=0\.0\.0\.0 -Dquarkus\.http\.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run\.jar" And container log should contain Embedded Postgres started at port And container log should not contain Application failed to start diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature index ef43b54cd0c..3684a1caa45 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-data-index-common.feature @@ -20,11 +20,11 @@ @docker.io/apache/incubator-kie-kogito-data-index-postgresql Feature: Kogito-data-index common feature. - Scenario: Verify if the debug is correctly enabled and test default http port + Scenario: Verify default http port When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 + Then container log should match regex -Djava\.library\.path="/home/kogito/lib" -Dquarkus\.http\.host=0\.0\.0\.0 -Dquarkus\.http\.port=8080 Scenario: check if a provided data index quarkus profile is correctly set on data index When container is started with env diff --git a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature index 66c5ee9c403..ac96c384a70 100644 --- a/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature +++ b/packages/kogito-jit-runner-image/test-resources/tests/features/kogito-jit-runner.feature @@ -28,11 +28,11 @@ Feature: Kogito-jit-runner feature. And the image should contain label io.k8s.display-name with value Kogito JIT Runner And the image should contain label io.openshift.tags with value kogito,jit-runner - Scenario: Verify if the debug is correctly enabled and test default http port + Scenario: Verify default http port When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Djava.library.path="/home/kogito/lib" -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should match regex -Djava\.library\.path="/home/kogito/lib" -Dquarkus\.http\.host=0\.0\.0\.0 -Dquarkus\.http\.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run\.jar" Scenario: Verify that jit runner can evaluate a DMN model with a context When container is started with env diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature index 896311a470c..83902aadd27 100644 --- a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature +++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature @@ -37,7 +37,7 @@ Feature: Kogito-jobs-service-all-in-one feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar" And container log should contain started in And container log should not contain Application failed to start @@ -46,7 +46,7 @@ Feature: Kogito-jobs-service-all-in-one feature. | variable | value | | SCRIPT_DEBUG | false | | JOBS_SERVICE_PERSISTENCE | something | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar" And container log should contain something is not supported, the allowed flavors are [ephemeral postgresql], defaulting to ephemeral Scenario: verify if container starts as expected @@ -59,7 +59,7 @@ Feature: Kogito-jobs-service-all-in-one feature. | QUARKUS_DATASOURCE_USERNAME | test | | QUARKUS_DATASOURCE_PASSWORD | 123456 | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar" And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql And container log should contain QUARKUS_DATASOURCE_USERNAME=test And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456 diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature index 5e0848de858..3138b9b6754 100644 --- a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature +++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-ephemeral.feature @@ -36,7 +36,7 @@ Feature: Kogito-jobs-service-ephemeral feature. When container is started with env | variable | value | | SCRIPT_DEBUG | false | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run.jar" And container log should contain started in And container log should not contain Application failed to start diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature index 3b6237a0297..761209e4bb8 100644 --- a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature +++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature @@ -30,7 +30,7 @@ Feature: Kogito-jobs-service-postgresql feature. Scenario: Verify if the application jar exists When container is started with command bash - Then run sh -c 'ls /home/kogito/bin/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/quarkus-app/quarkus-run.jar + Then run sh -c 'ls /home/kogito/bin/quarkus-app/quarkus-run.jar' in container and immediately check its output for "/home/kogito/bin/quarkus-app/quarkus-run.jar" Scenario: verify if container starts as expected When container is started with env @@ -41,7 +41,7 @@ Feature: Kogito-jobs-service-postgresql feature. | QUARKUS_DATASOURCE_USERNAME | test | | QUARKUS_DATASOURCE_PASSWORD | 123456 | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run.jar" And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql And container log should contain QUARKUS_DATASOURCE_USERNAME=test And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456 From 4a5c11f24a63a0c0fc814ce19e4a7bae3ed6c15f Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Tue, 17 Dec 2024 17:08:24 -0500 Subject: [PATCH 4/6] Fixing quotes on common postgresql DI Signed-off-by: Ricardo Zanini --- .../tests/features/kogito-common-postresql-services.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature index a5f7e0f570d..b0b35a2b578 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature @@ -27,5 +27,5 @@ Feature: Kogito-data-index postgresql feature. | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://localhost:5432/quarkus | | QUARKUS_DATASOURCE_USERNAME | kogito | | QUARKUS_DATASOURCE_PASSWORD | s3cr3t | - Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar /home/kogito/bin/quarkus-app/quarkus-run.jar + Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run.jar" And container log should contain Datasource '': Connection to localhost:5432 refused \ No newline at end of file From 4211ab831ca40653c8bd274e059e024c777bb558 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Tue, 17 Dec 2024 18:40:24 -0500 Subject: [PATCH 5/6] Fix blank spaces Signed-off-by: Ricardo Zanini --- .../tests/features/kogito-common-postresql-services.feature | 2 +- .../tests/features/kogito-jobs-service-common.feature | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature index b0b35a2b578..ead2f4b6752 100644 --- a/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature +++ b/packages/kogito-data-index-postgresql-image/test-resources/tests/features/kogito-common-postresql-services.feature @@ -23,7 +23,7 @@ Feature: Kogito-data-index postgresql feature. Scenario: verify if of container is correctly started with postgresql parameters When container is started with env | variable | value | - | SCRIPT_DEBUG | false | + | SCRIPT_DEBUG | false | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://localhost:5432/quarkus | | QUARKUS_DATASOURCE_USERNAME | kogito | | QUARKUS_DATASOURCE_PASSWORD | s3cr3t | diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature index 3550879c56d..df84e2bba47 100644 --- a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -28,4 +28,4 @@ Feature: Kogito-jobs-service common feature. | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | - Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar + Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 From c0085cd335bfeca9fa1745b1c393b08837dde9d3 Mon Sep 17 00:00:00 2001 From: Ricardo Zanini Date: Wed, 18 Dec 2024 09:55:23 -0500 Subject: [PATCH 6/6] Fix jobsservices features tests Signed-off-by: Ricardo Zanini --- .../tests/features/kogito-jobs-service-all-in-one.feature | 4 ---- .../tests/features/kogito-jobs-service-common.feature | 2 +- .../tests/features/kogito-jobs-service-common.feature | 6 ++---- .../tests/features/kogito-jobs-service-common.feature | 4 +--- .../tests/features/kogito-jobs-service-postgresql.feature | 6 +----- 5 files changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature index 83902aadd27..7501ed99c6a 100644 --- a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature +++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-all-in-one.feature @@ -60,8 +60,4 @@ Feature: Kogito-jobs-service-all-in-one feature. | QUARKUS_DATASOURCE_PASSWORD | 123456 | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar" - And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql - And container log should contain QUARKUS_DATASOURCE_USERNAME=test - And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456 - And container log should contain QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test And container log should contain Trying to establish a protocol version 3 connection to 10.11.12.13:5432 diff --git a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature index b1be21467e9..58fb8bea9c2 100644 --- a/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-allinone-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -28,4 +28,4 @@ Feature: Kogito-jobs-service common feature. | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | - Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar + Then container log should contain localhost:11111 diff --git a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature index df84e2bba47..d59d9868f2c 100644 --- a/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-ephemeral-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -17,15 +17,13 @@ # under the License. # -@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral -@docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral @docker.io/apache/incubator-kie-kogito-jobs-service-ephemeral Feature: Kogito-jobs-service common feature. Scenario: verify if the events is correctly enabled When container is started with env | variable | value | - | SCRIPT_DEBUG | false | + | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | - Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 + Then container log should contain localhost:11111 diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature index 000ee756234..8076381b3b7 100644 --- a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature +++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-common.feature @@ -17,8 +17,6 @@ # under the License. # -@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql -@docker.io/apache/incubator-kie-kogito-jobs-service-postgresql @docker.io/apache/incubator-kie-kogito-jobs-service-postgresql Feature: Kogito-jobs-service common feature. @@ -28,4 +26,4 @@ Feature: Kogito-jobs-service common feature. | SCRIPT_DEBUG | false | | ENABLE_EVENTS | true | | KOGITO_JOBS_PROPS | -Dkafka.bootstrap.servers=localhost:11111 | - Then container log should contain -Dkafka.bootstrap.servers=localhost:11111 -Dquarkus.profile=events-support -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar + Then container log should contain localhost:11111 diff --git a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature index 761209e4bb8..c7f2a1d1e93 100644 --- a/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature +++ b/packages/kogito-jobs-service-postgresql-image/test-resources/tests/features/kogito-jobs-service-postgresql.feature @@ -30,7 +30,7 @@ Feature: Kogito-jobs-service-postgresql feature. Scenario: Verify if the application jar exists When container is started with command bash - Then run sh -c 'ls /home/kogito/bin/quarkus-app/quarkus-run.jar' in container and immediately check its output for "/home/kogito/bin/quarkus-app/quarkus-run.jar" + Then run sh -c 'ls /home/kogito/bin/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/quarkus-app/quarkus-run.jar Scenario: verify if container starts as expected When container is started with env @@ -42,8 +42,4 @@ Feature: Kogito-jobs-service-postgresql feature. | QUARKUS_DATASOURCE_PASSWORD | 123456 | | QUARKUS_DATASOURCE_JDBC_URL | jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test | Then container log should contain -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080 -jar "/home/kogito/bin/quarkus-app/quarkus-run.jar" - And container log should contain QUARKUS_DATASOURCE_DB_KIND=postgresql - And container log should contain QUARKUS_DATASOURCE_USERNAME=test - And container log should contain QUARKUS_DATASOURCE_PASSWORD=123456 - And container log should contain QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://10.11.12.13:5432/hibernate_orm_test And container log should contain Trying to establish a protocol version 3 connection to 10.11.12.13:5432