diff options
author | Stephen J Day <stephen.day@docker.com> | 2016-09-08 20:44:25 -0700 |
---|---|---|
committer | Stephen J Day <stephen.day@docker.com> | 2016-09-19 11:19:55 -0700 |
commit | 9a072adff3fcd90c4f36214b355ef27b423f0144 (patch) | |
tree | 6446b5142faf77cfdd5af70093ed450b2f78bdf6 /client/container_rename_test.go | |
parent | 9d7be9df8f79b26a4b9778851cf19a6579f8bc61 (diff) | |
download | docker-9a072adff3fcd90c4f36214b355ef27b423f0144.tar.gz |
client: remove transport package
This package doesn't really seem to do anything of real interest.
Removing it and replacing with a few helper functions. Most of this was
maintaining a fork of ctxhttp to support a mock that was unnecessary.
We could probably do with a further refactor of the client interface.
There is a lot of confusion of between transport, http layer and
application layer that makes for some awkward code. This change
improves the situation to the point where no breaking changes are
introduced.
Signed-off-by: Stephen J Day <stephen.day@docker.com>
Diffstat (limited to 'client/container_rename_test.go')
-rw-r--r-- | client/container_rename_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/client/container_rename_test.go b/client/container_rename_test.go index 9344bab7db..732ebff5f7 100644 --- a/client/container_rename_test.go +++ b/client/container_rename_test.go @@ -13,7 +13,7 @@ import ( func TestContainerRenameError(t *testing.T) { client := &Client{ - transport: newMockClient(nil, errorMock(http.StatusInternalServerError, "Server error")), + client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")), } err := client.ContainerRename(context.Background(), "nothing", "newNothing") if err == nil || err.Error() != "Error response from daemon: Server error" { @@ -24,7 +24,7 @@ func TestContainerRenameError(t *testing.T) { func TestContainerRename(t *testing.T) { expectedURL := "/containers/container_id/rename" client := &Client{ - transport: newMockClient(nil, func(req *http.Request) (*http.Response, error) { + client: newMockClient(func(req *http.Request) (*http.Response, error) { if !strings.HasPrefix(req.URL.Path, expectedURL) { return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL) } |