client: enable API-version negotiation by default

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-12 16:39:20 +01:00
parent e752ec0f8e
commit 189942570a
23 changed files with 58 additions and 61 deletions

View File

@@ -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)