From 095691ce3c7989f27aed578c93f91e1e7ab3f6a1 Mon Sep 17 00:00:00 2001 From: Mikko Tiihonen Date: Sun, 24 Jul 2022 16:21:28 +0300 Subject: [PATCH] DB2 integration test re-enable (#559) * DB2 has a jdbc driver in maven repository * Re-enable db2 integration tests --- .github/workflows/build.yaml | 2 +- nflow-jetty/pom.xml | 19 ------------------- nflow-netty/pom.xml | 19 ------------------- nflow-tests/pom.xml | 23 ++++------------------- pom.xml | 6 ++++++ scripts/setup-db-db2.sh | 7 +------ 6 files changed, 12 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c6ac86ee4..18dac85df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -66,7 +66,7 @@ jobs: strategy: matrix: java: [ '11', '17' ] - db: [ 'h2', 'mariadb', 'postgresql', 'mysql', 'sqlserver', 'oracle' ] + db: [ 'h2', 'mariadb', 'postgresql', 'mysql', 'sqlserver', 'db2', 'oracle' ] runs-on: ubuntu-latest env: SPRING_PROFILES_ACTIVE: nflow.db.${{ matrix.db }} diff --git a/nflow-jetty/pom.xml b/nflow-jetty/pom.xml index 937ceab48..2216da54c 100644 --- a/nflow-jetty/pom.xml +++ b/nflow-jetty/pom.xml @@ -145,23 +145,4 @@ test - - - db2 - - - ${basedir}/../db2jcc4.jar - - - - - com.ibm.db2 - db2jcc4 - 4.24.92 - system - ${basedir}/../db2jcc4.jar - - - - diff --git a/nflow-netty/pom.xml b/nflow-netty/pom.xml index c7eefc430..b89086cce 100644 --- a/nflow-netty/pom.xml +++ b/nflow-netty/pom.xml @@ -77,23 +77,4 @@ test - - - db2 - - - ${basedir}/../db2jcc4.jar - - - - - com.ibm.db2 - db2jcc4 - 4.24.92 - system - ${basedir}/../db2jcc4.jar - - - - diff --git a/nflow-tests/pom.xml b/nflow-tests/pom.xml index 30f009ee3..9cdc62455 100644 --- a/nflow-tests/pom.xml +++ b/nflow-tests/pom.xml @@ -71,6 +71,10 @@ com.oracle.database.jdbc ojdbc11 + + com.ibm.db2 + jcc + @@ -79,25 +83,6 @@ https://public.nexus.pentaho.org/content/groups/omni/ - - - db2 - - - ${basedir}/../db2jcc4.jar - - - - - com.ibm.db2 - db2jcc4 - 4.24.92 - system - ${basedir}/../db2jcc4.jar - - - - diff --git a/pom.xml b/pom.xml index 3dab87a2b..a0f33fb0f 100644 --- a/pom.xml +++ b/pom.xml @@ -114,6 +114,7 @@ 3.12.0 1.4 4.3.0 + 11.5.7.0 3.0.0 1.12.1 5.1.0 @@ -778,6 +779,11 @@ ojdbc11 ${ojdbc.version} + + com.ibm.db2 + jcc + ${db2-jcc.version} + org.apache.commons diff --git a/scripts/setup-db-db2.sh b/scripts/setup-db-db2.sh index fab4b9133..caa79864c 100755 --- a/scripts/setup-db-db2.sh +++ b/scripts/setup-db-db2.sh @@ -14,11 +14,6 @@ case $DB_VERSION in ;; esac -$tool run --pull=always --rm --name db2 --entrypoint /bin/sh ibmcom/db2:$DB_VERSION -c "cat /opt/ibm/db2/V*/java/db2jcc4.jar" > db2jcc4.jar - -$tool run --rm --name db2 --cap-add IPC_LOCK --cap-add IPC_OWNER -e 'instance_name=root' -e 'DB2INST1_PASSWORD=nflow' -e 'LICENSE=accept' -e 'DBNAME=nflow' --publish 50000:50000 --detach ibmcom/db2:$DB_VERSION db2start +$tool run --pull=always --rm --name db2 --cap-add IPC_LOCK --cap-add IPC_OWNER -e PERSISTENT_HOME=false -e DB2INST1_PASSWORD=nflow -e LICENSE=accept -e DBNAME=nflow -e ARCHIVE_LOGS=false --publish 50000:50000 --detach ibmcom/db2:$DB_VERSION fgrep -m1 'Setup has completed' <(timeout 240 $tool logs -f db2) - -#$tool exec -it db2 su - db2inst1 -c '/opt/ibm/db2/V*/bin/db2 -tvs "CREATE DATABASE nflow USING CODESET UTF-8 TERRITORY us;"' -#$tool exec -it db2 su - db2inst1 -c '/opt/ibm/db2/V*/bin/db2 -tvs "ACTIVATE DATABASE nflow;"'