From cdc15205d85b8f0cb7940c99e957ae9199bf432e Mon Sep 17 00:00:00 2001 From: Kelvin Wang Date: Fri, 22 Jun 2018 10:13:58 -0700 Subject: [PATCH] fix go 1.8 compatibility --- plugins/inputs/jenkins/jenkins_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/inputs/jenkins/jenkins_test.go b/plugins/inputs/jenkins/jenkins_test.go index 70b350a90..881d5c61d 100644 --- a/plugins/inputs/jenkins/jenkins_test.go +++ b/plugins/inputs/jenkins/jenkins_test.go @@ -282,7 +282,7 @@ func TestGatherNodeData(t *testing.T) { ResponseTimeout: internal.Duration{Duration: time.Microsecond}, NodeExclude: []string{"ignore-1", "ignore-2"}, } - te := j.newInstance(ts.Client()) + te := j.newInstance(&http.Client{Transport: &http.Transport{}}) acc := new(testutil.Accumulator) j.gatherNodesData(acc) if err := acc.FirstError(); err != nil { @@ -328,7 +328,7 @@ func TestNewInstance(t *testing.T) { } ts := httptest.NewServer(mh) defer ts.Close() - mockClient := ts.Client() + mockClient := &http.Client{Transport: &http.Transport{}} tests := []struct { // name of the test name string @@ -667,7 +667,7 @@ func TestGatherJobs(t *testing.T) { "apps/k8s-cloud/PR-ignore2", }, } - te := j.newInstance(ts.Client()) + te := j.newInstance(&http.Client{Transport: &http.Transport{}}) acc := new(testutil.Accumulator) j.gatherJobs(acc) if err := acc.FirstError(); err != nil {