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

[CLOUD-3649] Add behave test to verify drivers are configured at runt… #235

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
32 changes: 31 additions & 1 deletion tests/features/datasource.feature
Original file line number Diff line number Diff line change
Expand Up @@ -849,4 +849,34 @@ Feature: EAP Openshift datasources
| GALLEON_PROVISION_LAYERS | cloud-server |
Then container log should contain WFLYSRV0025
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 0 elements on XPath //*[local-name()='datasource'] and wait 30 seconds
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 0 elements on XPath //*[local-name()='xa-datasource'] and wait 30 seconds
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 0 elements on XPath //*[local-name()='xa-datasource'] and wait 30 seconds

Scenario: Create a Data source and its driver at rutime by using environment variables
Given s2i build https://github.com/jboss-container-images/jboss-eap-modules from tests/examples/test-app-drivers-at-runtime with env and true
| variable | value |
| DRIVERS | DRVONE,DRVTWO,DRVTHREE |
| DRVONE_DRIVER_NAME | drv_one |
| DRVONE_DRIVER_MODULE | org.postgresql |
| DRVONE_DRIVER_CLASS | org.postgresql.Driver |
| DRVONE_XA_DATASOURCE_CLASS | org.postgresql.xa.PGXADataSource |
| DRVTWO_DRIVER_NAME | drv_two |
| DRVTWO_DRIVER_MODULE | org.postgresql |
| DRVTWO_XA_DATASOURCE_CLASS | org.postgresql.xa.PGXADataSource |
| DRVTHREE_DRIVER_NAME | drv_three |
| DRVTHREE_DRIVER_MODULE | org.postgresql |
| DRVTHREE_DRIVER_CLASS | org.postgresql.Driver |
| DB_SERVICE_PREFIX_MAPPING | dbone-postgresql=DSONE |
| DBONE_POSTGRESQL_SERVICE_HOST | 10.1.1.1 |
| DBONE_POSTGRESQL_SERVICE_PORT | 5432 |
| DSONE_JNDI | java:/jboss/datasources/PostgreSQLDS |
| DSONE_DATABASE | postgre |
| DSONE_DRIVER | drv_one |
| DSONE_URL | jdbc:postgresql://localhost:5432/postgresdb |
| DSONE_NONXA | true |
| DSONE_USERNAME | postgre |
| DSONE_PASSWORD | admin |
Then container log should contain WFLYSRV0025
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 1 elements on XPath //*[local-name()='driver'][@name='drv_one']
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 1 elements on XPath //*[local-name()='driver'][@name='drv_two']
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should have 1 elements on XPath //*[local-name()='driver'][@name='drv_three']
Then XML file /opt/eap/standalone/configuration/standalone-openshift.xml should contain value drv_one on XPath //*[local-name()='datasource']/*[local-name()='driver']