From 8a555bbb5fe171f28e1171712550ffc6f5755ce9 Mon Sep 17 00:00:00 2001 From: Brian Bland Date: Wed, 10 Dec 2014 11:09:14 -0800 Subject: [PATCH] Attempts to fix go vet for circle --- client/client_test.go | 60 +++++++++++++++++++------------------------ 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index d4a335ec..5eaf6b97 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -90,18 +90,16 @@ func TestPush(t *testing.T) { } } - handler := testutil.NewHandler(append(blobRequestResponseMappings, testutil.RequestResponseMap{ - { - Request: testutil.Request{ - Method: "PUT", - Route: "/v2/" + name + "/manifest/" + tag, - Body: manifestBytes, - }, - Response: testutil.Response{ - StatusCode: http.StatusOK, - }, + handler := testutil.NewHandler(append(blobRequestResponseMappings, testutil.RequestResponseMapping{ + Request: testutil.Request{ + Method: "PUT", + Route: "/v2/" + name + "/manifest/" + tag, + Body: manifestBytes, }, - }...)) + Response: testutil.Response{ + StatusCode: http.StatusOK, + }, + })) server := httptest.NewServer(handler) client := New(server.URL) objectStore := &memoryObjectStore{ @@ -183,18 +181,16 @@ func TestPull(t *testing.T) { } } - handler := testutil.NewHandler(append(blobRequestResponseMappings, testutil.RequestResponseMap{ - { - Request: testutil.Request{ - Method: "GET", - Route: "/v2/" + name + "/manifest/" + tag, - }, - Response: testutil.Response{ - StatusCode: http.StatusOK, - Body: manifestBytes, - }, + handler := testutil.NewHandler(append(blobRequestResponseMappings, testutil.RequestResponseMapping{ + Request: testutil.Request{ + Method: "GET", + Route: "/v2/" + name + "/manifest/" + tag, }, - }...)) + Response: testutil.Response{ + StatusCode: http.StatusOK, + Body: manifestBytes, + }, + })) server := httptest.NewServer(handler) client := New(server.URL) objectStore := &memoryObjectStore{ @@ -306,18 +302,16 @@ func TestPullResume(t *testing.T) { } for i := 0; i < 3; i++ { - layerRequestResponseMappings = append(layerRequestResponseMappings, testutil.RequestResponseMap{ - { - Request: testutil.Request{ - Method: "GET", - Route: "/v2/" + name + "/manifest/" + tag, - }, - Response: testutil.Response{ - StatusCode: http.StatusOK, - Body: manifestBytes, - }, + layerRequestResponseMappings = append(layerRequestResponseMappings, testutil.RequestResponseMapping{ + Request: testutil.Request{ + Method: "GET", + Route: "/v2/" + name + "/manifest/" + tag, }, - }...) + Response: testutil.Response{ + StatusCode: http.StatusOK, + Body: manifestBytes, + }, + }) } handler := testutil.NewHandler(layerRequestResponseMappings)