diff --git a/tests_env/docker/codeception/docker-entrypoint.sh b/tests_env/docker/codeception/docker-entrypoint.sh index 6204c03690..4e404fca07 100755 --- a/tests_env/docker/codeception/docker-entrypoint.sh +++ b/tests_env/docker/codeception/docker-entrypoint.sh @@ -190,13 +190,13 @@ if [[ $MULTISITE == "1" ]]; then wp plugin activate mailpoet/mailpoet.php --url=$HTTP_HOST/$WP_TEST_MULTISITE_SLUG fi -if [[ $CIRCLE_JOB == *"_with_premium_"* ]]; then +if [[ $CIRCLE_JOB == *"_with_premium_"* || $WITH_PREMIUM == "1" ]]; then # Copy MailPoet Premium to plugin path - cp -r -n /project/mailpoet-premium /wp-core/wp-content/plugins/mailpoet-premium +# cp -r -n /project/mailpoet-premium /wp-core/wp-content/plugins/mailpoet-premium chown www-data:www-data /wp-core/wp-content/plugins/mailpoet-premium/generated chmod -R 755 /wp-core/wp-content/plugins/mailpoet-premium/generated # Activate MailPoet Premium - wp plugin activate mailpoet-premium || { echo "MailPoet Premium plugin activation failed!" ; exit 1; } + wp plugin activate mailpoet-premium/mailpoet-premium.php || { echo "MailPoet Premium plugin activation failed!" ; exit 1; } fi # WP installs translations into the `lang` folder, and it should be writable, this change has been added in WP 6.2 @@ -218,8 +218,13 @@ mysql -u wordpress -pwordpress wordpress -h mysql -e "SELECT @@global.sql_mode" # print tables info mysql -u wordpress -pwordpress wordpress -h mysql -e "SELECT TABLE_NAME, ENGINE, TABLE_COLLATION FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'wordpress'" -cd /wp-core/wp-content/plugins/mailpoet -/project/vendor/bin/codecept run $TEST_TYPE $@ +if [[ $WITH_PREMIUM == "1" ]]; then + cd /wp-core/wp-content/plugins/mailpoet-premium +else + cd /wp-core/wp-content/plugins/mailpoet +fi + +/wp-core/wp-content/plugins/mailpoet/vendor/bin/codecept run $TEST_TYPE $@ -vvv exitcode=$? exit $exitcode diff --git a/tests_env/docker/docker-compose.yml b/tests_env/docker/docker-compose.yml index 62a44203aa..232d4578a5 100644 --- a/tests_env/docker/docker-compose.yml +++ b/tests_env/docker/docker-compose.yml @@ -11,6 +11,7 @@ services: - ../../mailpoet:/project - ../../mailpoet:/wp-core/wp-content/plugins/mailpoet - ../../mailpoet-premium:/project/mailpoet-premium + - ../../mailpoet-premium:/wp-core/wp-content/plugins/mailpoet-premium - ./codeception/docker-entrypoint.sh:/docker-entrypoint.sh - ../../dev/php.ini:/usr/local/etc/php/conf.d/php_user.ini - ../../dev/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini @@ -38,6 +39,7 @@ services: - ../../mailpoet:/project - ../../mailpoet:/wp-core/wp-content/plugins/mailpoet - ../../mailpoet-premium:/project/mailpoet-premium + - ../../mailpoet-premium:/wp-core/wp-content/plugins/mailpoet-premium - ./codeception/docker-entrypoint.sh:/docker-entrypoint.sh - ../../dev/php.ini:/usr/local/etc/php/conf.d/php_user.ini - ../../dev/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini @@ -82,6 +84,7 @@ services: - ../../mailpoet:/project - ../../mailpoet:/var/www/html/wp-content/plugins/mailpoet - ../../mailpoet-premium:/project/mailpoet-premium + - ../../mailpoet-premium:/var/www/html/wp-content/plugins/mailpoet-premium tmpfs: - /var/www/html/wp-content/uploads/mailpoet/ ports: