[Golang] Disable Test Cache


Not sure when Go starts to cache the test results. When I tried to run test with HTTP requests, the results are all the same after successful test. After some Google searches, I found the answer in the reply of the issue [1]. The test caching can be disabled by the following setting:

GOCACHE=off

If you use command line, you can run the following command:

$ export GOCACHE=off

Or add the above command in the Makefile if you use make in your workflow.


Tested on: Ubuntu Linux 17.10, Go 1.10.


References:

[1]cmd/dist: no obvious way to disable test caching · Issue #22758 · golang/go · GitHub