Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Promote a non-200 response from the cron spawn test to an error #66
Conversation
…r than a warning.
…quest to `example.com`
Scenario: Testing WP-Cron | ||
When I try `wp cron test` | ||
Then STDERR should not contain: | ||
""" | ||
Error: | ||
""" | ||
|
schlessera
May 6, 2020
Member
Instead of deleting this test, I think it should stay for a valid setup check, and we need to add a second test after deleting the wp-cron.php
to verify that it does indeed throw an error.
Instead of deleting this test, I think it should stay for a valid setup check, and we need to add a second test after deleting the wp-cron.php
to verify that it does indeed throw an error.
johnbillion
May 6, 2020
Author
Contributor
As I mentioned in the issue description, this scenario performs a request to example.com
over the internet (which returns a 404 because example.com doesn't use WordPress).
@schlessera Does WP-CLI contain any existing tests which perform an HTTP request to an actual local WordPress site?
As I mentioned in the issue description, this scenario performs a request to example.com
over the internet (which returns a 404 because example.com doesn't use WordPress).
@schlessera Does WP-CLI contain any existing tests which perform an HTTP request to an actual local WordPress site?
schlessera
May 6, 2020
Member
You could probably point to the proper WordPress instance using something like this as setup and populating the options accordingly:
Given a WP install
And I launch in the background `wp server --host=localhost --port=8080`
You could probably point to the proper WordPress instance using something like this as setup and populating the options accordingly:
Given a WP install
And I launch in the background `wp server --host=localhost --port=8080`
johnbillion
May 6, 2020
Author
Contributor
Ah yeah nice, I'll look into it.
Ah yeah nice, I'll look into it.
johnbillion commentedApr 25, 2020
Fixes #65
Note that the current feature test for testing the cron spawner sends an HTTP request to
example.com
(which is the default domain configured for the tests), so here I'm removing it because it's useless and it's not possible to affect its response. Suggestions welcome for improving this.