mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
client: rename/deprecate WithVersion, WithVersionFromEnv
Add WithAPIVersion and WithAPIVersionFromEnv to be more clear on the intent, and to align with other related options and fields. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -53,7 +53,7 @@ func TestAPIClientVersionOldNotSupported(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
vMinInt--
|
||||
version := fmt.Sprintf("%s.%d", major, vMinInt)
|
||||
apiClient := request.NewAPIClient(t, client.WithVersion(version))
|
||||
apiClient := request.NewAPIClient(t, client.WithAPIVersion(version))
|
||||
|
||||
expectedErrorMessage := fmt.Sprintf("Error response from daemon: client version %s is too old. Minimum supported API version is %s, please upgrade your client to a newer version", version, minApiVersion)
|
||||
_, err = apiClient.ServerVersion(ctx, client.ServerVersionOptions{})
|
||||
|
||||
Reference in New Issue
Block a user