Skip to content

Commit

Permalink
Issue 16881 more improvements (#16894)
Browse files Browse the repository at this point in the history
* #16881 Allow to debug integration tests

* #16881 Mysql config
  • Loading branch information
jgambarios committed Jul 19, 2019
1 parent c6d21e5 commit 29babfc
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docker/tests/integration/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ ARG BUILD_ID=origin/master
# In order to run the integration test a license must be provided
ARG LICENSE_KEY

# Disabled the gradle debug by default
ARG TEST_PARAMS=""
ENV TEST_PARAMS_ENV=${TEST_PARAMS}

# One of ["postgres", "mysql", "oracle", "mssql"]
ARG DB_TYPE=postgres
ENV DB_TYPE_ENV=${DB_TYPE}
Expand Down
8 changes: 6 additions & 2 deletions docker/tests/integration/mysql-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ services:
BUILD_FROM: COMMIT
BUILD_ID: origin/master
DB_TYPE: mysql
# TEST_PARAMS: "--debug-jvm"
# TEST_PARAMS: "--tests *HTMLPageAssetRenderedTest"
LICENSE_KEY: ${LICENSE_KEY}
depends_on:
- database
ports:
- "15005:5005"
volumes:
- type: bind
source: ./reports
Expand All @@ -48,7 +52,7 @@ services:
ports:
- "13306:3306"
volumes:
# - db:/var/lib/mysql
- ./setup/init-scripts/mysql:/docker-entrypoint-initdb.d/
- ./setup/db/mysql/custom.cnf:/etc/mysql/conf.d/custom.cnf
- ./setup/db/mysql/init-scripts:/docker-entrypoint-initdb.d/
networks:
- db_net
7 changes: 5 additions & 2 deletions docker/tests/integration/postgres-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ services:
BUILD_FROM: COMMIT
BUILD_ID: origin/master
DB_TYPE: postgres
# TEST_PARAMS: "--debug-jvm"
# TEST_PARAMS: "--tests *HTMLPageAssetRenderedTest"
LICENSE_KEY: ${LICENSE_KEY}
depends_on:
- database
ports:
- "15005:5005"
volumes:
- type: bind
source: ./reports
Expand All @@ -46,7 +50,6 @@ services:
ports:
- "15432:5432"
volumes:
# - db:/var/lib/postgresql/data
- ./setup/init-scripts/postgres:/docker-entrypoint-initdb.d/
- ./setup/db/postgres/init-scripts:/docker-entrypoint-initdb.d/
networks:
- db_net
7 changes: 6 additions & 1 deletion docker/tests/integration/setup/build-src/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ if [[ "${1}" == "dotcms" || -z "${1}" ]]; then
exit 1
fi

if [ ! -z "${TEST_PARAMS_ENV}" ]
then
echo "Running integration tests with extra parameters [${TEST_PARAMS_ENV}]"
fi

echo "Running for database: [${DB_TYPE_ENV}]"
export databaseType=${DB_TYPE_ENV}

cd /build/src/core/dotCMS \
&& ./gradlew integrationTest
&& ./gradlew integrationTest ${TEST_PARAMS_ENV}

# Required code, without it gradle will exit 1 killing the docker container
if [ $? -eq 0 ]
Expand Down
4 changes: 4 additions & 0 deletions docker/tests/integration/setup/db/mysql/custom.cnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[mysqld]
lower_case_table_names=1
character-set-server = utf8
collation-server = utf8_general_ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
#set -e

#echo "=============== installing PL/pgSQL... ================="
#createlang plpgsql template1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- CREATE LANGUAGE plpgsql;
Empty file.

0 comments on commit 29babfc

Please sign in to comment.