caddyserver / forwardproxy

Forward proxy plugin for the Caddy web server
Apache License 2.0
603 stars 228 forks source link

Caddy2 fix tests #109

Closed johnzhanghua closed 11 months ago

johnzhanghua commented 1 year ago

1. What does this change do, exactly?

This change based on the PR 74 , to fix the broken test cases

2. Please link to the relevant issues.

PR 74 tests failed

3. Which documentation changes (if any) need to be made because of this PR?

4. Checklist

gaby commented 1 year ago

@johnzhanghua Thanks for the PR, some of the changes introduced this issue:

[/home/runner/work/forwardproxy/forwardproxy/forwardproxy.go:397] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    396:    }
  > 397:    r.Body.Close()
    398: 
johnzhanghua commented 1 year ago

@johnzhanghua Thanks for the PR, some of the changes introduced this issue:

[/home/runner/work/forwardproxy/forwardproxy/forwardproxy.go:397] - G104 (CWE-703): Errors unhandled. (Confidence: HIGH, Severity: LOW)
    396:  }
  > 397:  r.Body.Close()
    398: 

Sorry, fixed.

gaby commented 1 year ago

@johnzhanghua GoSec issues are gone, some of the tests still fail

gaby commented 1 year ago

@johnzhanghua You can run them locally using go test -v ./... with go 1.21

johnzhanghua commented 1 year ago

@johnzhanghua You can run them locally using go test -v ./... with go 1.21

Added a wait, should be fine now. Tested locally with Docker ubuntu. Could you please trigger the checks ?

gaby commented 1 year ago

@johnzhanghua Awesome, will start reviewing

gaby commented 11 months ago

@johnzhanghua Thank you for the PR, I will keep working on the caddy2 branch