mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: enable API-version negotiation by default
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -257,7 +257,6 @@ func TestNegotiateAPIVersionEmpty(t *testing.T) {
|
||||
const expected = MinAPIVersion
|
||||
|
||||
client, err := New(FromEnv,
|
||||
WithAPIVersionNegotiation(),
|
||||
WithBaseMockClient(mockPingResponse(http.StatusOK, PingResult{APIVersion: expected})),
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
@@ -330,7 +329,6 @@ func TestNegotiateAPIVersion(t *testing.T) {
|
||||
t.Run(tc.doc, func(t *testing.T) {
|
||||
opts := []Opt{
|
||||
FromEnv,
|
||||
WithAPIVersionNegotiation(),
|
||||
WithBaseMockClient(mockPingResponse(http.StatusOK, PingResult{APIVersion: tc.pingVersion})),
|
||||
}
|
||||
|
||||
@@ -396,7 +394,6 @@ func TestNegotiateAPIVersionAutomatic(t *testing.T) {
|
||||
WithBaseMockClient(func(req *http.Request) (*http.Response, error) {
|
||||
return mockPingResponse(http.StatusOK, PingResult{APIVersion: pingVersion})(req)
|
||||
}),
|
||||
WithAPIVersionNegotiation(),
|
||||
)
|
||||
assert.NilError(t, err)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user