Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions features/db-import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ Feature: Import a WordPress database

Scenario: Import database with passed-in options
Given a WP install

Given a debug.sql file:
And a debug.sql file:
"""
INSERT INTO `wp_options` (`option_id`, `option_name`, `option_value`, `autoload`) VALUES (999, 'testoption', 'testval', 'yes'),(999, 'testoption', 'testval', 'yes');
"""
Expand Down
8 changes: 4 additions & 4 deletions features/db-query.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: Query the database with WordPress' MySQL config
"""

When I try `wp db query "SELECT COUNT(ID) FROM wp_posts;" --dbuser=no_such_user`
Then the return code should not be 0
Then the return code should not be 0
And STDERR should contain:
"""
Access denied
Expand All @@ -48,7 +48,7 @@ Feature: Query the database with WordPress' MySQL config
"""

When I try `wp db query --defaults "SELECT COUNT(ID) FROM wp_posts;" --dbuser=no_such_user`
Then the return code should not be 0
Then the return code should not be 0
And STDERR should contain:
"""
Access denied
Expand All @@ -65,7 +65,7 @@ Feature: Query the database with WordPress' MySQL config
"""

When I try `wp db query --no-defaults "SELECT COUNT(ID) FROM wp_posts;" --dbuser=no_such_user`
Then the return code should not be 0
Then the return code should not be 0
And STDERR should contain:
"""
Access denied
Expand All @@ -75,7 +75,7 @@ Feature: Query the database with WordPress' MySQL config
Scenario: MySQL defaults are available as appropriate with --defaults flag
Given a WP install

When I try `wp db query --defaults --debug`
When I try `wp db query --defaults --debug`
Then STDERR should match #Debug \(db\): Running shell command: /usr/bin/env (mysql|mariadb) --no-auto-rehash#

When I try `wp db query --debug`
Expand Down
3 changes: 1 addition & 2 deletions features/db-search.feature
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ Feature: Search through the database

When I run `wp db query "CREATE TABLE no_key ( awesome_stuff TEXT );"`
And I run `wp db query "CREATE TABLE no_text ( id int(11) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) );"`

When I try `wp db search example.com no_key --all-tables`
And I try `wp db search example.com no_key --all-tables`
Then STDOUT should be empty
And STDERR should be:
"""
Expand Down
2 changes: 1 addition & 1 deletion features/db-tables.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: List database tables
# See https://core.trac.wordpress.org/ticket/19755

# Leave out wp_blogmeta for old WP compat.
And STDOUT should contain:
Then STDOUT should contain:
"""
wp_blogs
wp_commentmeta
Expand Down
Loading