Switch to running the integration tests inside the container. This allows finer grained control over paths and allows the PHP error tests to be reinstated.

pull/655/head
John Blackbourn 2 years ago
parent 599c2b762a
commit 164fb6a58c

@ -4,13 +4,13 @@
# -o pipefail Produce a failure return code if any command errors
set -eo pipefail
# Prep:
DATABASE_PORT=`docker port query-monitor-database | grep "[0-9]+$" -ohE | head -1`
# Run the integration tests:
echo "Running tests..."
TEST_SITE_DATABASE_PORT=$DATABASE_PORT \
docker-compose exec \
--workdir /var/www/html/wp-content/plugins/query-monitor php \
./vendor/bin/codecept run integration --env singlesite --skip-group ms-required "$1"
TEST_SITE_DATABASE_PORT=$DATABASE_PORT \
docker-compose exec \
--workdir /var/www/html/wp-content/plugins/query-monitor php \
./vendor/bin/codecept run integration --env multisite --skip-group ms-excluded "$1"

@ -5,13 +5,5 @@ paths:
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- tad\WPBrowser\Extension\Symlinker
config:
tad\WPBrowser\Extension\Symlinker:
mode: plugin
destination:
default: tests/wordpress/wp-content/plugins
params:
- env

@ -8,9 +8,9 @@ modules:
- WPLoader
config:
WPLoader:
wpRootFolder: 'tests/wordpress'
wpRootFolder: /var/www/html
dbName: exampledb
dbHost: '127.0.0.1:%TEST_SITE_DATABASE_PORT%'
dbHost: database
dbUser: exampleuser
dbPassword: examplepass
configFile: tests/integration/includes/bootstrap.php

@ -101,7 +101,7 @@ class CollectorPHPErrors extends Test {
$component, '', ''
);
self::assertSame( '', $component->context );
self::assertSame( 'bar', $component->context );
self::assertFalse( $actual );
}
Loading…
Cancel
Save