Skip to content

Commit f0ebd7a

Browse files
J0WInijel
authored andcommitted
Set default_authentication_plugin and use only one container in tests
1 parent 98aa7b8 commit f0ebd7a

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
before_install:
1818
- export TESTSUITE_PASSWORD=`openssl rand -base64 30`
19-
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=$TESTSUITE_PASSWORD -d $DB
19+
- docker run --name db_server -e MYSQL_ROOT_PASSWORD=$TESTSUITE_PASSWORD -v $PWD/testing/testing.cnf:/etc/mysql/conf.d/testing.cnf:ro -d $DB
2020

2121
install:
2222
- pip install mechanize html5lib

docker-compose.testing.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
version: '2'
22

33
services:
4-
mariadb:
5-
image: mariadb:latest
4+
db_server:
5+
image: ${DB}
66
container_name: phpmyadmin_testing_mariadb
77
environment:
88
- MYSQL_ROOT_PASSWORD=test123
9-
10-
mysql:
11-
image: mysql:latest
12-
container_name: phpmyadmin_testing_mysql
13-
environment:
14-
- MYSQL_ROOT_PASSWORD=test123
9+
volumes:
10+
- ./testing/testing.cnf:/etc/mysql/conf.d/testing.cnf:ro
1511

1612
phpmyadmin:
1713
build:
@@ -25,5 +21,4 @@ services:
2521
- PMA_ARBITRARY=1
2622
- TESTSUITE_PASSWORD=test123
2723
depends_on:
28-
- mariadb
29-
- mysql
24+
- db_server

testing/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ FROM phpmyadmin/phpmyadmin
66
RUN apk add --no-cache curl py2-pip
77
RUN pip install mechanize html5lib
88

9-
COPY test-mariadb.ini test-mysql.ini /etc/supervisor.d/
9+
COPY test.ini /etc/supervisor.d/
1010
COPY phpmyadmin_test.py test-docker.sh world.sql /

testing/test-mysql.ini renamed to testing/test.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[program:test-mysql]
2-
command=/test-docker.sh test 80 mysql
2+
command=/test-docker.sh test 80 db_server
33
autostart=true
44
autorestart=false
55
priority=3

testing/testing.cnf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mysqld]
2+
default_authentication_plugin = mysql_native_password

testing/wait-for-testing.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TIMEOUT=0
1111

1212
sleep 5
1313

14-
while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests'` -lt 2 ] ; do
14+
while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of db_server tests'` -lt 1 ] ; do
1515
sleep 1
1616
TIMEOUT=$(($TIMEOUT + 1))
1717
if [ $TIMEOUT -gt 20 ] ; then
@@ -21,7 +21,7 @@ while [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c
2121
fi
2222
done
2323

24-
if [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of \(mysql\|mariadb\) tests.*SUCCESS'` -lt 2 ] ; then
24+
if [ `docker-compose -f docker-compose.testing.yml logs phpmyadmin | grep -c 'Result of db_server tests.*SUCCESS'` -lt 1 ] ; then
2525
docker-compose -f docker-compose.testing.yml logs phpmyadmin
2626
echo "${RED}Failed${NC}"
2727
exit 2

0 commit comments

Comments
 (0)