[Rt-commit] rt branch, 5.0/docker-tests, updated. rt-5.0.0alpha1-16-g0bb95eef3
Jim Brandt
jbrandt at bestpractical.com
Wed Mar 4 09:52:27 EST 2020
The branch, 5.0/docker-tests has been updated
via 0bb95eef3b85143ce13898a052b50beadc7b1399 (commit)
from 7aad64538fe63f8f514d96c533ae9482b5382ee4 (commit)
Summary of changes:
.travis.yml | 8 +++++++-
Dockerfile | 5 +++++
lib/RT/Test.pm | 1 +
3 files changed, 13 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 0bb95eef3b85143ce13898a052b50beadc7b1399
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed Mar 4 09:49:25 2020 -0500
Add config to run tests with mariadb
diff --git a/.travis.yml b/.travis.yml
index 7e85be252..d6ea2b425 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,13 +3,19 @@ services: docker
env:
- RT_TEST_PARALLEL=1
+ - RT_DBA_USER=root
+ - RT_DBA_PASSWORD=password
+ - DB_VERSION_TAG=10.3
+# - RT_TEST_DB_HOST=?
# $TRAVIS_BUILD_DIR will have a clone of the current branch
before_install:
+ - docker run --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb:$DB_VERSION_TAG
- docker build -t rt-base .
- docker run -d -v $TRAVIS_BUILD_DIR:/rt --name rt rt-base
+ - docker run -d -v $TRAVIS_BUILD_DIR:/rt --name rt --link mariadb:db rt-base
- docker ps -a
- - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=SQLite --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
+ - docker exec -it rt bash -c "cd /rt && ./configure.ac --with-db-type=mysql --with-my-user-group --enable-layout=inplace --enable-developer --enable-externalauth --disable-gpg --disable-smime && mkdir -p /rt/var && make testdeps"
script:
- docker exec -it rt bash -c "cd /rt && prove -lj9 t/*"
diff --git a/Dockerfile b/Dockerfile
index f5b6b9261..98cd60c37 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,10 @@
FROM netsandbox/request-tracker-base
ENV RT_TEST_PARALLEL 1
+ENV RT_DBA_USER root
+ENV RT_DBA_PASSWORD password
+ENV RT_TEST_DB_HOST=172.17.0.2
+ENV RT_TEST_RT_HOST=172.17.0.3
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
git \
@@ -11,6 +15,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
libgumbo1 \
build-essential \
libhtml-formatexternal-perl \
+ libdbd-mysql-perl \
&& rm -rf /var/lib/apt/lists/*
RUN cpanm \
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 6ce48cf13..59cf8ba8e 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -323,6 +323,7 @@ Set( \$ShowHistory, "always");
}
if ( $ENV{'RT_TEST_DB_HOST'} ) {
print $config "Set( \$DatabaseHost , '$ENV{'RT_TEST_DB_HOST'}');\n";
+ print $config "Set( \$DatabaseRTHost , '$ENV{'RT_TEST_RT_HOST'}');\n";
}
if ( $args{'plugins'} ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list