Skip to content

Commit

Permalink
Fix support for compose v2 in drupal test-unit command
Browse files Browse the repository at this point in the history
  • Loading branch information
andytson-inviqa committed Apr 3, 2023
1 parent 734654f commit aafc3e6
Showing 1 changed file with 7 additions and 2 deletions.
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

0 comments on commit aafc3e6

Please sign in to comment.