This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
tests: TestExportMetrics_conversionFromViewData doesn't work with proxies #77
Labels
bug
Something isn't working
Please answer these questions before submitting a bug report.
What version of the Exporter are you using?
v0.6.0
What version of OpenCensus are you using?
N/A
What version of Go are you using?
go version go1.13 darwin/amd64
What did you do?
If possible, provide a recipe for reproducing the error.
What did you expect to see?
Tests pass.
What did you see instead?
TestExportMetrics_conversionFromViewData
fails, as the exporter attempts but fails to use an HTTP proxy for the host""
.Additional context
The test supplies an agent address with a port but no host:
If HTTP_PROXY is set in the env, grpc (I assume) attempts to use an HTTP proxy. As the HTTP proxy code (https://github.com/golang/net/blob/master/http/httpproxy/proxy.go#L256) treats an empty host as an error, it isn't possible to set NO_PROXY to ignore the proxy for requests with no host. As a result, the exporter is unable to export metrics, causing
TestExportMetrics_conversionFromViewData
to fail.The simplest fix would be to specify
localhost
or similar as the host.The text was updated successfully, but these errors were encountered: