-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pageload_smoketest.py and CI setup and jobs
A smoketest that sets up `site_vars.php` and a minimal set of database tables so that PGDP can be served from the `php -S` CLI web server. Then it loads many pages (soon to be every page) with representative parameters and checks if there are any PHP errors, warnings, or notices in the server logs. Useful for, e.g., catching variables that aren't defined at runtime, and other issues that PHPStan and the PHP linter can't find. This is deliberately not an exhaustive test of all possible inputs -- smoke tests are meant to be fast and to weed out obvious brokenness. That said, we probably should check each of, e.g. `task.php`'s `action=` parameters so we get reasonable code coverage. This is incomplete, but is good enough to be useful as is.
- Loading branch information
Showing
10 changed files
with
725 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
// To test that errors are detected correctly. | ||
trigger_error("Yes, it is a problem, sir.", E_USER_ERROR); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
// An 'always suceeds' script to check server liveness. | ||
echo "Hello world\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
// To test that notices are detected correctly. | ||
trigger_error("Good morning, Mr. Wooster.", E_USER_NOTICE); |
Oops, something went wrong.