|
|
@@ -363,7 +363,10 @@ func TestV2MachinesEndpoint(t *testing.T) {
|
|
|
defer s.Close()
|
|
|
|
|
|
for _, tt := range tests {
|
|
|
- req, _ := http.NewRequest(tt.method, s.URL+machinesPrefix, nil)
|
|
|
+ req, err := http.NewRequest(tt.method, s.URL+machinesPrefix, nil)
|
|
|
+ if err != nil {
|
|
|
+ t.Fatal(err)
|
|
|
+ }
|
|
|
resp, err := http.DefaultClient.Do(req)
|
|
|
if err != nil {
|
|
|
t.Fatal(err)
|
|
|
@@ -381,7 +384,10 @@ func TestServeMachines(t *testing.T) {
|
|
|
h := Handler{Peers: peers}
|
|
|
|
|
|
writer := httptest.NewRecorder()
|
|
|
- req, _ := http.NewRequest("GET", "", nil)
|
|
|
+ req, err := http.NewRequest("GET", "", nil)
|
|
|
+ if err != nil {
|
|
|
+ t.Fatal(err)
|
|
|
+ }
|
|
|
h.serveMachines(writer, req)
|
|
|
w := "http://localhost:8080, http://localhost:8081, http://localhost:8082"
|
|
|
if g := writer.Body.String(); g != w {
|