Skip to content

Commit

Permalink
Include tests-mysql port in dev:start output (#38590)
Browse files Browse the repository at this point in the history
  • Loading branch information
jblz authored Feb 8, 2022
1 parent ca3c6da commit 1b9fe38
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/env/lib/commands/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,20 +174,31 @@ module.exports = async function start( { spinner, debug, update, xdebug } ) {

const siteUrl = config.env.development.config.WP_SITEURL;
const e2eSiteUrl = config.env.tests.config.WP_TESTS_DOMAIN;

const { out: mySQLAddress } = await dockerCompose.port(
'mysql',
3306,
dockerComposeConfig
);
const mySQLPort = mySQLAddress.split( ':' ).pop();

const { out: testsMySQLAddress } = await dockerCompose.port(
'tests-mysql',
3306,
dockerComposeConfig
);
const testsMySQLPort = testsMySQLAddress.split( ':' ).pop();

spinner.prefixText = 'WordPress development site started'
.concat( siteUrl ? ` at ${ siteUrl }` : '.' )
.concat( '\n' )
.concat( 'WordPress test site started' )
.concat( e2eSiteUrl ? ` at ${ e2eSiteUrl }` : '.' )
.concat( '\n' )
.concat( `MySQL is listening on port ${ mySQLPort }` )
.concat(
`MySQL for automated testing is listening on port ${ testsMySQLPort }`
)
.concat( '\n' );

spinner.text = 'Done!';
Expand Down

0 comments on commit 1b9fe38

Please sign in to comment.