Some new tests and fixings

This commit is contained in:
Philipp Holzer 2019-09-23 15:23:09 +02:00
parent 0823f4d72d
commit e3e3c1ef28
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
4 changed files with 187 additions and 42 deletions

View File

@ -3,7 +3,7 @@ name: mysql-php7.1
steps: steps:
- name: mysql-php7.1 - name: mysql-php7.1
image: friendicaci/php7.1:php7.1 image: friendicaci/php7.1:php7.1.32
commands: commands:
- NOCOVERAGE=true ./autotest.sh - NOCOVERAGE=true ./autotest.sh
environment: environment:
@ -32,3 +32,145 @@ services:
# event: # event:
# - pull_request # - pull_request
# - push # - push
---
kind: pipeline
name: mysql-php7.2
steps:
- name: mysql-php7.2
image: friendicaci/php7.2:php7.2.22
commands:
- NOCOVERAGE=true ./autotest.sh
environment:
MYSQL_USERNAME: friendica
MYSQL_PASSWORD: friendica
MYSQL_DATABASE: friendica
MYSQL_HOST: mysql
services:
- name: mysql
image: mysql:8.0
command: [ "--default-authentication-plugin=mysql_native_password" ]
environment:
MYSQL_ROOT_PASSWORD: friendica
MYSQL_USER: friendica
MYSQL_PASSWORD: friendica
MYSQL_DATABASE: friendica
tmpfs:
- /var/lib/mysql
#trigger:
# branch:
# - master
# - develop
# - "*-rc"
# event:
# - pull_request
# - push
---
kind: pipeline
name: mysql-php7.3
steps:
- name: mysql-php7.3
image: friendicaci/php7.3:php7.3.9
commands:
- NOCOVERAGE=true ./autotest.sh
environment:
MYSQL_USERNAME: friendica
MYSQL_PASSWORD: friendica
MYSQL_DATABASE: friendica
MYSQL_HOST: mysql
services:
- name: mysql
image: mysql:8.0
command: [ "--default-authentication-plugin=mysql_native_password" ]
environment:
MYSQL_ROOT_PASSWORD: friendica
MYSQL_USER: friendica
MYSQL_PASSWORD: friendica
MYSQL_DATABASE: friendica
tmpfs:
- /var/lib/mysql
#trigger:
# branch:
# - master
# - develop
# - "*-rc"
# event:
# - pull_request
# - push
---
kind: pipeline
name: redis-php7.1
steps:
- name: redis-php7.1
image: friendicaci/php7.1:php7.1.32
commands:
- NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh
environment:
REDIS_HOST: redis
services:
- name: redis
image: redis
#trigger:
# branch:
# - master
# - develop
# - "*-rc"
# event:
# - pull_request
# - push
---
kind: pipeline
name: redis-php7.2
steps:
- name: redis-php7.2
image: friendicaci/php7.2:php7.2.22
commands:
- NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh
environment:
REDIS_HOST: redis
services:
- name: redis
image: redis
#trigger:
# branch:
# - master
# - develop
# - "*-rc"
# event:
# - pull_request
# - push
---
kind: pipeline
name: redis-php7.3
steps:
- name: redis-php7.3
image: friendicaci/php7.3:php7.3.9
commands:
- NOCOVERAGE=true NOINSTALL=true TEST_SELECTION=REDIS ./autotest.sh
environment:
REDIS_HOST: redis
services:
- name: redis
image: redis
#trigger:
# branch:
# - master
# - develop
# - "*-rc"
# event:
# - pull_request
# - push

View File

@ -79,6 +79,7 @@ function execute_tests {
mv config/local.config.php config/local.config-autotest-backup.php mv config/local.config.php config/local.config-autotest-backup.php
fi fi
if [ -z "$NOINSTALL" ]; then
if [ -n "$USEDOCKER" ]; then if [ -n "$USEDOCKER" ]; then
echo "Fire up the mysql docker" echo "Fire up the mysql docker"
DOCKER_CONTAINER_ID=$(docker run \ DOCKER_CONTAINER_ID=$(docker run \
@ -118,6 +119,7 @@ function execute_tests {
#call installer #call installer
echo "Installing Friendica..." echo "Installing Friendica..."
"$PHP" ./bin/console.php autoinstall --dbuser="$DATABASEUSER" --dbpass=friendica --dbdata="$DATABASENAME" --dbhost="$DATABASEHOST" --url=https://friendica.local --admin=admin@friendica.local "$PHP" ./bin/console.php autoinstall --dbuser="$DATABASEUSER" --dbpass=friendica --dbdata="$DATABASENAME" --dbhost="$DATABASEHOST" --url=https://friendica.local --admin=admin@friendica.local
fi
#test execution #test execution
echo "Testing..." echo "Testing..."
@ -137,16 +139,16 @@ function execute_tests {
# per default, there is no cache installed # per default, there is no cache installed
GROUP='--exclude-group=REDIS,MEMCACHE,MEMCACHED,APCU' GROUP='--exclude-group=REDIS,MEMCACHE,MEMCACHED,APCU'
if [ "$TEST_SELECTION" == "REDIS" ]; then if [ "$TEST_SELECTION" == "REDIS" ]; then
GROUP="--group REDIS" GROUP="--group=REDIS"
fi fi
if [ "$TEST_SELECTION" == "MEMCACHE" ]; then if [ "$TEST_SELECTION" == "MEMCACHE" ]; then
GROUP="--group MEMCACHE" GROUP="--group=MEMCACHE"
fi fi
if [ "$TEST_SELECTION" == "MEMCACHED" ]; then if [ "$TEST_SELECTION" == "MEMCACHED" ]; then
GROUP="--group MEMCACHED" GROUP="--group=MEMCACHED"
fi fi
if [ "$TEST_SELECTION" == "APCU" ]; then if [ "$TEST_SELECTION" == "APCU" ]; then
GROUP="--group APCU" GROUP="--group=APCU"
fi fi
if [ "$TEST_SELECTION" == "NODB" ]; then if [ "$TEST_SELECTION" == "NODB" ]; then
GROUP="--exclude-group=DB,SLOWDB" GROUP="--exclude-group=DB,SLOWDB"

View File

@ -23,6 +23,7 @@ trait VFSTrait
'bin' => [], 'bin' => [],
'static' => [], 'static' => [],
'test' => [], 'test' => [],
'logs' => [],
]; ];
// create a virtual directory and copy all needed files and folders to it // create a virtual directory and copy all needed files and folders to it

View File

@ -121,7 +121,7 @@ class StreamLoggerTest extends AbstractLoggerTest
*/ */
public function testWrongDir() public function testWrongDir()
{ {
$logger = new StreamLogger('test', '/a/wrong/directory/file.txt', $this->introspection); $logger = new StreamLogger('test', '/$%/wrong/directory/file.txt', $this->introspection);
$logger->emergency('not working'); $logger->emergency('not working');
} }