So, after investigating this bug a bit, I was able to reproduce it
locally (thanks to
https://wiki.ubuntu.com/ProposedMigration#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 TestTraceInfoOnTimeout, 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-autopkgtest-fix

autopkgtest is now passing:

https://autopkgtest.ubuntu.com/results/autopkgtest-impish-sergiodj-
golang-github-go-resty-resty-autopkgtest-fix/?format=plain

** Patch added: "fix-autopkgtest-golang-github-go-resty-resty.patch"
   
https://bugs.launchpad.net/ubuntu/+source/golang-github-go-resty-resty/+bug/1942491/+attachment/5522641/+files/fix-autopkgtest-golang-github-go-resty-resty.patch

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1942491

Title:
  autopkgtest failure (proxy-related)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/golang-github-go-resty-resty/+bug/1942491/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to