Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for compose v2 in drupal test-unit command #767

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/drupal/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ command('test-unit'):
$COMPOSE_BIN exec -T -u root php-fpm bash -c 'mkdir -p /app/docroot/sites/simpletest'
$COMPOSE_BIN exec -T -u root php-fpm bash -c 'chown -R www-data:www-data /app/docroot/sites/simpletest'
if ! $COMPOSE_BIN exec -T -u root php-fpm bash -c '[ -f /app/bin/phpunit ]'; then
run "docker cp ${COMPOSE_PROJECT_NAME}_console_1:/app/bin - | docker cp - ${COMPOSE_PROJECT_NAME}_php-fpm_1:/app/"
run "docker cp ${COMPOSE_PROJECT_NAME}_console_1:/app/vendor - | docker cp - ${COMPOSE_PROJECT_NAME}_php-fpm_1:/app/"
if [[ "$($COMPOSE_BIN version --short)" =~ ^1\. ]]; then
run "docker cp ${COMPOSE_PROJECT_NAME}_console_1:/app/bin - | docker cp - ${COMPOSE_PROJECT_NAME}_php-fpm_1:/app/"
run "docker cp ${COMPOSE_PROJECT_NAME}_console_1:/app/vendor - | docker cp - ${COMPOSE_PROJECT_NAME}_php-fpm_1:/app/"
else
run "$COMPOSE_BIN cp console:/app/bin - | $COMPOSE_BIN cp - php-fpm:/app/"
run "$COMPOSE_BIN cp console:/app/vendor - | $COMPOSE_BIN cp - php-fpm:/app/"
fi
fi
passthru $COMPOSE_BIN exec -T -u www-data php-fpm bash -c 'bin/phpunit'
---
Expand Down