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

[9.100.x-prod] BAQE-2901: Fix CR jobs of kogito-images #46

Merged
merged 3 commits into from
May 28, 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
4 changes: 4 additions & 0 deletions tests/features/common-custom-truststore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
@quay.io/kiegroup/kogito-jit-runner
@quay.io/kiegroup/kogito-jobs-service-ephemeral
@quay.io/kiegroup/kogito-jobs-service-postgresql
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
@openshift-serverless-1/logic-data-index-postgresql-rhel8
@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: Common tests for Custom TrustStore configuration
# This test sets an invalid certificate to the container, it fails to start, and if timing is bad cekit hangs on 'Running command ps -C java in container'
# See https://github.com/apache/incubator-kie-kogito-images/issues/1722
Expand Down
4 changes: 4 additions & 0 deletions tests/features/common-dynamic-resources.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#@quay.io/kiegroup/kogito-jit-runner
@quay.io/kiegroup/kogito-jobs-service-ephemeral
#@quay.io/kiegroup/kogito-jobs-service-postgresql
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
#@openshift-serverless-1/logic-data-index-postgresql-rhel8
#@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: Common tests for Kogito images

Scenario: Verify if the properties were correctly set using DEFAULT MEM RATIO
Expand Down
5 changes: 5 additions & 0 deletions tests/features/common.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
@quay.io/kiegroup/kogito-jobs-service-postgresql
@quay.io/kiegroup/kogito-swf-builder
@quay.io/kiegroup/kogito-base-builder
@openshift-serverless-1/logic-swf-builder-rhel8
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
@openshift-serverless-1/logic-data-index-postgresql-rhel8
@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: Common tests for Kogito images

Scenario: Verify if Kogito user is correctly configured
Expand Down
2 changes: 2 additions & 0 deletions tests/features/data-index/kogito-data-index-common.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@quay.io/kiegroup/kogito-data-index-ephemeral
@quay.io/kiegroup/kogito-data-index-postgresql
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
@openshift-serverless-1/logic-data-index-postgresql-rhel8
Feature: Kogito-data-index common feature.

Scenario: Verify if the debug is correctly enabled and test default http port
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-data-index-ephemeral
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
Feature: Kogito-data-index ephemeral postgresql feature.

Scenario: verify if all labels are correctly set on kogito-data-index-ephemeral image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-data-index-postgresql
@openshift-serverless-1/logic-data-index-postgresql-rhel8
Feature: Kogito-data-index postgresql feature.

Scenario: verify if all labels are correctly set on kogito-data-index-postgresql image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@quay.io/kiegroup/kogito-jobs-service-ephemeral
@quay.io/kiegroup/kogito-jobs-service-postgresql
@quay.io/kiegroup/kogito-jobs-service-allinone
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: Kogito-jobs-service common feature.

Scenario: verify if the events is correctly enabled
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-jobs-service-ephemeral
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
Feature: Kogito-jobs-service-ephemeral feature.

Scenario: verify if all labels are correctly set kogito-jobs-service image image
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-jobs-service-postgresql
@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: Kogito-jobs-service-postgresql feature.

Scenario: verify if all labels are correctly set kogito-jobs-service image image
Expand Down
1 change: 1 addition & 0 deletions tests/features/kogito-common-postresql-services.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-data-index-postgresql
@openshift-serverless-1/logic-data-index-postgresql-rhel8
Feature: Kogito-data-index postgresql feature.

Scenario: verify if of container is correctly started with postgresql parameters
Expand Down
1 change: 1 addition & 0 deletions tests/features/kogito-swf-builder.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-swf-builder
@openshift-serverless-1/logic-swf-builder-rhel8
Feature: Serverless Workflow builder images

Scenario: Verify that the application is built and started correctly
Expand Down
2 changes: 2 additions & 0 deletions tests/features/kogito-swf-common.feature
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@quay.io/kiegroup/kogito-swf-builder
@quay.io/kiegroup/kogito-swf-devmode
@openshift-serverless-1/logic-swf-builder-rhel8
@openshift-serverless-1/logic-swf-devmode-rhel8
Feature: Serverless Workflow images common

Scenario: Verify if the swf and quarkus files are under /home/kogito/.m2/repository
Expand Down
1 change: 1 addition & 0 deletions tests/features/kogito-swf-devmode.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@quay.io/kiegroup/kogito-swf-devmode
@openshift-serverless-1/logic-swf-devmode-rhel8
Feature: Serverless Workflow devmode images

Scenario: Verify if container starts in devmode by default
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
Feature: logic-data-index-ephemeral-rhel8 feature

Scenario: verify if all labels are correctly set on logic-data-index-ephemeral-rhel8 image
Given image is built
Then the image should contain label io.openshift.expose-services with value 8080:http
And the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.k8s.description with value Red Hat build of Runtime image for Kogito Data Index Service for ephemeral PostgreSQL persistence provider
And the image should contain label io.k8s.display-name with value Red Hat build of Kogito Data Index Service - ephemeral PostgreSQL
And the image should contain label io.openshift.tags with value logic-data-index,kogito,data-index,data-index-ephemeral
And the image should contain label com.redhat.component with value openshift-serverless-1-logic-data-index-ephemeral-rhel8-container

Scenario: verify if of logic-data-index-ephemeral-rhel8 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
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 |
Then container log should contain -Dquarkus.profile=http-events-support
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@openshift-serverless-1/logic-data-index-postgresql-rhel8
Feature: logic-data-index-postgresql postgresql feature.

Scenario: verify if all labels are correctly set on logic-data-index-postgresql image
Given image is built
Then the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.openshift.expose-services with value 8080:http
And the image should contain label io.k8s.description with value Red Hat build of Runtime image for Kogito Data Index Service for PostgreSQL persistence provider
And the image should contain label io.k8s.display-name with value Red Hat build of Kogito Data Index Service - PostgreSQL
And the image should contain label io.openshift.tags with value logic-data-index,kogito,data-index,data-index-postgresql

Scenario: check if the default quarkus profile is correctly set on data index
When container is started with env
| variable | value |
| SCRIPT_DEBUG | true |
Then container log should contain -Dquarkus.profile=kafka-events-support
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@openshift-serverless-1/logic-jobs-service-postgresql-rhel8
Feature: logic-jobs-service-postgresql feature.

Scenario: verify if all labels are correctly set kogito-jobs-service image image
Given image is built
Then the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.openshift.expose-services with value 8080:http
And the image should contain label io.k8s.description with value Red Hat build of Runtime image for Kogito Jobs Service based on Postgresql
And the image should contain label io.k8s.display-name with value Red Hat build of Kogito Jobs Service based on Postgresql
And the image should contain label io.openshift.tags with value logic-jobs-service,kogito,jobs-service-postgresql

Scenario: Verify if the application jar exists
When container is started with command bash
Then run sh -c 'ls /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/postgresql/quarkus-app/quarkus-run.jar

Scenario: verify if container starts as expected
When container is started with env
| variable | value |
| SCRIPT_DEBUG | true |
| QUARKUS_LOG_LEVEL | DEBUG |
| 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
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
@@ -0,0 +1,23 @@
@openshift-serverless-1/logic-jobs-service-ephemeral-rhel8
Feature: logic-jobs-service-ephemeral feature.

Scenario: verify if all labels are correctly set logic-jobs-service-ephemeral image
Given image is built
Then the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.openshift.expose-services with value 8080:http
And the image should contain label io.k8s.description with value Red Hat build of Runtime image for Kogito in memory Jobs Service
And the image should contain label io.k8s.display-name with value Red Hat build of Kogito in memory Jobs Service
And the image should contain label io.openshift.tags with value logic-jobs-service,kogito,jobs-service-ephemeral

Scenario: Verify if the application jar exists
When container is started with command bash
Then run sh -c 'ls /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar' in container and immediately check its output for /home/kogito/bin/ephemeral/quarkus-app/quarkus-run.jar

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
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
@@ -0,0 +1,11 @@
@openshift-serverless-1/logic-swf-builder-rhel8
Feature: logic-swf-builder-rhel8 feature

Scenario: verify if all labels are correctly set on logic-swf-builder-rhel8 image
Given image is built
Then the image should contain label io.openshift.expose-services with value 8080:http
And the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.k8s.description with value Red Hat build of Runtime image for Kogito Serverless Workflow builder with Quarkus extensions libraries preinstalled
And the image should contain label io.k8s.display-name with value Red Hat OpenShift Serverless Logic Builder image
And the image should contain label io.openshift.tags with value logic-swf-builder,kogito,swf-builder
And the image should contain label com.redhat.component with value openshift-serverless-1-logic-swf-builder-rhel8-container
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@openshift-serverless-1/logic-swf-devmode-rhel8
Feature: logic-swf-devmode-rhel8 feature

Scenario: verify if all labels are correctly set on logic-swf-devmode-rhel8 image
Given image is built
Then the image should contain label io.openshift.expose-services with value 8080:http,5005:http
And the image should contain label maintainer with value serverless-logic <[email protected]>
And the image should contain label io.k8s.description with value Red Hat build of Kogito Serverless Workflow development mode image with Quarkus extensions libraries preinstalled.
And the image should contain label io.k8s.display-name with value Red Hat OpenShift Serverless Logic SWF Devmode
And the image should contain label io.openshift.tags with value logic,devmode,kogito,kogito,development,serverless,workflow
And the image should contain label com.redhat.component with value openshift-serverless-1-logic-swf-devmode-rhel8-container
2 changes: 2 additions & 0 deletions tests/features/supporting-services-common.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
@quay.io/kiegroup/kogito-data-index-ephemeral
@quay.io/kiegroup/kogito-data-index-postgresql
@quay.io/kiegroup/kogito-jit-runner
@openshift-serverless-1/logic-data-index-ephemeral-rhel8
@openshift-serverless-1/logic-data-index-postgresql-rhel8
Feature: kogito supporting services common feature

Scenario: Verify if the application jar exists
Expand Down
Loading