summaryrefslogtreecommitdiff
path: root/client/network_disconnect_test.go
diff options
context:
space:
mode:
authorStephen J Day <stephen.day@docker.com>2016-09-08 20:44:25 -0700
committerStephen J Day <stephen.day@docker.com>2016-09-19 11:19:55 -0700
commit9a072adff3fcd90c4f36214b355ef27b423f0144 (patch)
tree6446b5142faf77cfdd5af70093ed450b2f78bdf6 /client/network_disconnect_test.go
parent9d7be9df8f79b26a4b9778851cf19a6579f8bc61 (diff)
downloaddocker-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/network_disconnect_test.go')
-rw-r--r--client/network_disconnect_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/network_disconnect_test.go b/client/network_disconnect_test.go
index d9dbb67159..b54a2b1ccf 100644
--- a/client/network_disconnect_test.go
+++ b/client/network_disconnect_test.go
@@ -15,7 +15,7 @@ import (
func TestNetworkDisconnectError(t *testing.T) {
client := &Client{
- transport: newMockClient(nil, errorMock(http.StatusInternalServerError, "Server error")),
+ client: newMockClient(errorMock(http.StatusInternalServerError, "Server error")),
}
err := client.NetworkDisconnect(context.Background(), "network_id", "container_id", false)
@@ -28,7 +28,7 @@ func TestNetworkDisconnect(t *testing.T) {
expectedURL := "/networks/network_id/disconnect"
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)
}