Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonataflow-images] [kogito-images] Fix #2817 - Disable debug on e2e tests #2818

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -27,16 +27,16 @@ 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 | true |
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

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
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ 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 |
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 '<default>': Connection to localhost:5432 refused
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
@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 | true |
Then container log should contain -Djava.library.path=/home/kogito/lib -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=8080
| SCRIPT_DEBUG | false |
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
| 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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
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"
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ 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 | true |
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 -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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,28 @@ 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 |
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
| 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

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
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
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 |
| 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
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
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 Trying to establish a protocol version 3 connection to 10.11.12.13:5432
Original file line number Diff line number Diff line change
Expand Up @@ -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
Then container log should contain localhost:11111
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -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 | 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
Then container log should contain localhost:11111
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ 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 |
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
| 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

Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
# 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.

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
Then container log should contain localhost:11111
Loading
Loading