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

Add --format flag in core update #254

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ernilambar
Copy link
Contributor

Fixes #129

@ernilambar ernilambar marked this pull request as ready for review March 11, 2024 04:48
@ernilambar ernilambar requested a review from a team as a code owner March 11, 2024 04:48
@schlessera schlessera changed the title Add format in core update Add --format flag in core update Mar 14, 2024
@ernilambar
Copy link
Contributor Author

ernilambar commented Mar 14, 2024

Looks like we dont have should contain a table containing rows. Regarding table we have should be a table containing rows and should end with a table containing rows. Both conditions are not applicable in this case.

Our output would be like this:

Starting update...
Unpacking the update...
Cleaning up files...
No files found that need cleaning up.
name	old_version	new_version	status
core	6.0	6.1	Updated
Success: WordPress updated successfully.

@schlessera Any suggestion how we can implement test for table in this case?

Or, should be implement quiet logger for table also?

@ernilambar
Copy link
Contributor Author

Looks like should end with a table containing rows does not necessarily check the table in the end. May be we should introduce should contain a table containing rows and also fix this feature context.

@BrianHenryIE
Copy link
Member

I would lean towards implementing the quiet logger for table output too.

And I can confirm ThenStepDefinitions::then_stdout_should_end_with_a_table_containing_rows() does not test that the table is at the end of the output. It searches stdout for the table header and checks the remainder of stdout for the expected rows. It would be somewhat more accurately named then_stdout_should_contain_a_table_containing_rows, but if output contained two tables, it could incorrectly pass if the second table coincidentally contained the row values that were expected in the first table.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Format for 'wp core update'
4 participants