-
Notifications
You must be signed in to change notification settings - Fork 0
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
Closes #59: Deletes or rename debug.log
file before tests
#60
Conversation
src/support/hooks.ts
Outdated
const debugLogExists = await exists(debugLogPath); | ||
|
||
if (debugLogExists) { | ||
await rm(debugLogPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should not only remove the debug.log but every scenario debug.log so we don't have unnecessary logs piled up over time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @wp-media/qa-team can help here, if they have a preference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, yea that's not a bad idea.
We could do delete everything that ends by .log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with removing them from all places.
There was an oversight while I was reviewing
@Miraeld, @jeawhanlee, me and @Mai-Saad tested this, and here are the conclusions:
We tested by having a page template added to a test, that triggered a PHP fatal error in the debug.log file
Expected here would be that we rename the debug.log for every scenario that creates it irrespective of whether the error it’s wpr related or not. |
Thanks @hanna-meda I pushed a fix for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug.log entries are deleting before running tests ✓
debug.log file is suffixed by the scenario name during which errors were caught ✓
- if errors contain any of the patterns:
/plugins/wp-rocket/
wpr_rucss_used_css
wpr_rocket_cache
scenario(s) will fail - if any other error, not wpr related, the scenario will be passed.
Description
Fixes #59
Documentation
User documentation
It will deletes the
debug.log
before running tests, and once the test process is started, it will renamedebug.log
if it exists todebug-{previousTestName.log
.It requires to setup the
ssh
environment within thewp.config.ts
to work.Technical documentation
Type of change
Delete options that are not relevant.
New dependencies
Risks
Checklists
Feature validation