-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: use test host name for marker if localhost alias #370
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Felipe Zipitria <[email protected]>
if err != nil { | ||
return nil, fmt.Errorf("ftw/run: can't resolve destination %+v: %w", dest, err) | ||
} |
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.
Don't know if this even make sense. Maybe just ignoring the error and moving on?
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 think it does. Running the test makes no sense because resolution will fail again.
What's the use case? |
Ok, I understand the use case. |
if err != nil { | ||
return nil, fmt.Errorf("ftw/run: can't resolve destination %+v: %w", dest, err) | ||
} |
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 think it does. Running the test makes no sense because resolution will fail again.
} | ||
// we only take the first IP address | ||
if net.ParseIP(addrs[0]).IsLoopback() { | ||
host = dest.DestAddr |
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.
Apart from the comment, I think this should be set to the host entry of the current stage. The Host
header will be the deciding factor for choosing the location / virtual host, so if we change the host here to mylocalhostalias
but the test request has a host name of anotheralias
, the two requests will end up in different locations / virtual hosts.
host = dest.DestAddr | |
// With multiple locations / virtual hosts, logs can be written to different files, | |
// in which case the internal requests for marking and flushing must end up in the | |
// same log file (host name match). | |
host = dest.DestAddr |
what
why
caveats
Fixes #361