Skip to content

Commit

Permalink
Test MySQLi connection via TLS on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Aug 17, 2020
1 parent ca56596 commit 6baf064
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ jobs:
- stage: Test
php: 7.4
env: DB=mysqli.docker IMAGE=mysql:8.0
- stage: Test
php: 7.4
env: DB=mysqli-tls.docker IMAGE=mysql:8.0
- stage: Test
php: 7.4
env: DB=mariadb.docker IMAGE=mariadb:10.3
Expand Down
1 change: 1 addition & 0 deletions tests/travis/docker-run-mysql-or-mariadb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docker run \
--detach \
--env MYSQL_ALLOW_EMPTY_PASSWORD=yes \
--env MYSQL_DATABASE=doctrine_tests \
--volume /tmp/mysql:/var/lib/mysql \
--publish 33306:3306 \
--name rdbms \
"$IMAGE" $CMD_OPTIONS
Expand Down
39 changes: 39 additions & 0 deletions tests/travis/mysqli-tls.docker.travis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<var name="db_driver" value="mysqli"/>
<var name="db_host" value="127.0.0.1"/>
<var name="db_port" value="33306"/>
<var name="db_user" value="root"/>
<var name="db_dbname" value="doctrine_tests"/>
<var name="db_driver_option_ssl_ca" value="/tmp/mysql/ca.pem"/>
<var name="db_driver_option_ssl_cert" value="/tmp/mysql/client-cert.pem"/>
<var name="db_driver_option_ssl_key" value="/tmp/mysql/client-key.pem"/>
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
</whitelist>
</filter>

<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>

0 comments on commit 6baf064

Please sign in to comment.