openresty / openresty/test-nginx
bug: error_log does not consider error_log_file
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 456
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
I have a test, where I specify a error_log_file section, however, the error_log assertion helper seems to not consider that i am specifying a custom error_log_file, and looks for the default servroot/logs/error.log
=== TEST 1: unauthorized GET
Without the correct headers, our openresty app should smack down this request.
--- log_level: debug
--- error_log_file: /var/log/custom/error.log
--- http_config eval: $::http_config
--- config eval: $::config
--- main_config eval: $::main_config
--- server_name eval: $::server_name
--- tcp_listen: 8080
--- tcp_reply eval
"HTTP/1.0 200\r\n\r\nhello world"
--- request
GET /
--- error_code: 403
--- error_log eval
["error here"]
I found this note in the documentation:
Right now, it will not affect the --- error_log section and etc accordingly.
That seems to note this (limitation?), but I'm confused what the point of having a error_log_file section is if one can't use the error_log methods against the specified custom error.log file.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the error_log_file section and the error_log assertion helper, using the linked documentation note as context. Confirm how the helper chooses the log path and whether custom error_log_file values are considered; done means assertions inspect the specified custom log rather than only servroot/logs/error.log.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100