use MYSQL_PORT

This commit is contained in:
wojsmol 2021-03-12 10:50:10 +01:00
parent 011de21d79
commit d43dce5931
2 changed files with 7 additions and 7 deletions

View file

@ -29,7 +29,7 @@ Feature: Scaffold install-wp-tests.sh tests
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
# Hardcoded for GHA, needs to be made more flexible for local setups.
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
And I try `rm -fr /tmp/behat-wordpress`

@ -76,7 +76,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""

# Hardcoded for GHA, needs to be made more flexible for local setups.
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "SHOW DATABASES"`
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
Then the return code should be 0
And STDOUT should contain:
"""
@ -115,7 +115,7 @@ Feature: Scaffold install-wp-tests.sh tests
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
# Hardcoded for GHA, needs to be made more flexible for local setups.
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
And I try `rm -fr /tmp/behat-wordpress`

@ -175,7 +175,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""

# Hardcoded for GHA, needs to be made more flexible for local setups.
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "SHOW DATABASES"`
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
Then the return code should be 0
And STDOUT should contain:
"""
@ -191,7 +191,7 @@ Feature: Scaffold install-wp-tests.sh tests
And save STDOUT as {PLUGIN_DIR}
And I run `wp scaffold plugin hello-world`
# Hardcoded for GHA, needs to be made more flexible for local setups.
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
And I try `rm -fr /tmp/behat-wordpress`

@ -241,7 +241,7 @@ Feature: Scaffold install-wp-tests.sh tests
"""

# Hardcoded for GHA, needs to be made more flexible for local setups.
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "SHOW DATABASES"`
When I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h(MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "SHOW DATABASES"`
Then the return code should be 0
And STDOUT should contain:
"""

View file

@ -89,7 +89,7 @@ Feature: Scaffold theme unit tests
<?php echo __FILE__ . " loaded.\n";
"""
# Hardcoded for GHA, needs to be made more flexible for local setups.
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_TCP_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I run `mysql -u{DB_USER} -p{DB_PASSWORD} -h{MYSQL_HOST} -P{MYSQL_PORT} --protocol=tcp -e "DROP DATABASE IF EXISTS wp_cli_test_scaffold"`
And I try `rm -fr /tmp/behat-wordpress-tests-lib`
And I try `rm -fr /tmp/behat-wordpress`
And I try `WP_TESTS_DIR=/tmp/behat-wordpress-tests-lib WP_CORE_DIR=/tmp/behat-wordpress {THEME_DIR}/p2child/bin/install-wp-tests.sh wp_cli_test_scaffold {DB_USER} {DB_PASSWORD} {DB_HOST} latest`