roundTripper.RoundTripStub = http.DefaultTransport.RoundTrip httpClient = &http.Client{ Transport: roundTripper, } c = client.DaemonClient{ JSONClient: client.JSONClient{ BaseURL: server.URL(), Marshaler: marshaler, Unmarshaler: unmarshaler, HttpClient: httpClient, }, } marshaler.MarshalStub = json.Marshal unmarshaler.UnmarshalStub = json.Unmarshal }) AfterEach(func() { server.Close() }) Describe("CNIAdd", func() { var expectedCNIPayload models.CNIAddPayload Context("when network is set", func() { BeforeEach(func() { expectedCNIPayload = models.CNIAddPayload{ Args: "FOO=BAR;ABC=123", ContainerNamespace: "/some/namespace/path",