autopkgtest failure (proxy-related)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
golang-github-go-resty-resty (Ubuntu) |
Fix Released
|
High
|
Sergio Durigan Junior |
Bug Description
The current version of golang-
...
=== RUN TestSRV
resty_
--- FAIL: TestSRV (59.30s)
...
=== RUN TestTraceInfoOn
resty_
resty_
resty_
resty_
resty_
--- FAIL: TestTraceInfoOn
...
FAIL
FAIL github.
FAIL
dh_auto_test: error: cd _build && go test -vet=off -v -p 1 github.
make: *** [debian/rules:6: build] Error 25
autopkgtest [20:40:01]: test dh-golang-
autopkgtest [20:40:02]: test dh-golang-
dh-golang-
autopkgtest [20:40:02]: @@@@@@@
dh-golang-
The two tests mentioned above need internet to work, and misbehave when $http_proxy is set.
tags: | added: patch |
So, after investigating this bug a bit, I was able to reproduce it locally (thanks to https:/ /wiki.ubuntu. com/ProposedMig ration# I.27m_seeing_ a_squid_ proxy.3F_ _My_tests_ behave_ differently_ there.21), and was also able to confirm that when $http_proxy is unset, everything passes.
My first attempt at a real fix for this problem was to edit the two test functions (TestSRV and TestTraceInfoOn Timeout, both from request_test.go), and add the following snippet at the top of each one:
os.Unsetenv( "http_proxy" )
For some very strange reason, this doesn't work. It should, but it doesn't. I still can't believe it...
Anyway, the next best solution was to override dh_auto_test and unset $http_proxy there (thanks, Lucas), given that dh_golang_ autopkgtest will invoke it anyway. This works.
I'm attaching the debdiff that fixes the problem.
There's a PPA with the proposed change here:
https:/ /launchpad. net/~sergiodj/ +archive/ ubuntu/ golang- github- go-resty- resty-autopkgte st-fix
autopkgtest is now passing:
https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- impish- sergiodj- golang- github- go-resty- resty-autopkgte st-fix/ ?format= plain