fix go 1.8 compatibility
This commit is contained in:
parent
73eaa057d1
commit
cdc15205d8
|
@ -282,7 +282,7 @@ func TestGatherNodeData(t *testing.T) {
|
||||||
ResponseTimeout: internal.Duration{Duration: time.Microsecond},
|
ResponseTimeout: internal.Duration{Duration: time.Microsecond},
|
||||||
NodeExclude: []string{"ignore-1", "ignore-2"},
|
NodeExclude: []string{"ignore-1", "ignore-2"},
|
||||||
}
|
}
|
||||||
te := j.newInstance(ts.Client())
|
te := j.newInstance(&http.Client{Transport: &http.Transport{}})
|
||||||
acc := new(testutil.Accumulator)
|
acc := new(testutil.Accumulator)
|
||||||
j.gatherNodesData(acc)
|
j.gatherNodesData(acc)
|
||||||
if err := acc.FirstError(); err != nil {
|
if err := acc.FirstError(); err != nil {
|
||||||
|
@ -328,7 +328,7 @@ func TestNewInstance(t *testing.T) {
|
||||||
}
|
}
|
||||||
ts := httptest.NewServer(mh)
|
ts := httptest.NewServer(mh)
|
||||||
defer ts.Close()
|
defer ts.Close()
|
||||||
mockClient := ts.Client()
|
mockClient := &http.Client{Transport: &http.Transport{}}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
// name of the test
|
// name of the test
|
||||||
name string
|
name string
|
||||||
|
@ -667,7 +667,7 @@ func TestGatherJobs(t *testing.T) {
|
||||||
"apps/k8s-cloud/PR-ignore2",
|
"apps/k8s-cloud/PR-ignore2",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
te := j.newInstance(ts.Client())
|
te := j.newInstance(&http.Client{Transport: &http.Transport{}})
|
||||||
acc := new(testutil.Accumulator)
|
acc := new(testutil.Accumulator)
|
||||||
j.gatherJobs(acc)
|
j.gatherJobs(acc)
|
||||||
if err := acc.FirstError(); err != nil {
|
if err := acc.FirstError(); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue