chore: enable Docker API version negotiation
This commit is contained in:
parent
b05bc6f98b
commit
ba356137c3
@ -46,7 +46,7 @@ func TestIntegration(t *testing.T) {
|
||||
|
||||
logger := testhelpers.NewTestLogger(t).With("component", "integration")
|
||||
logger.Info("Initialised logger", "debug_level", logger.Enabled(ctx, slog.LevelDebug), "runner_debug", os.Getenv("RUNNER_DEBUG"))
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv)
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv, dockerclient.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
|
||||
screen, screenCaptureC, getContents := setupSimulationScreen(t)
|
||||
@ -246,7 +246,7 @@ func TestIntegrationDestinationValidations(t *testing.T) {
|
||||
defer cancel()
|
||||
|
||||
logger := testhelpers.NewTestLogger(t).With("component", "integration")
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv)
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv, dockerclient.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
|
||||
screen, screenCaptureC, getContents := setupSimulationScreen(t)
|
||||
|
@ -23,7 +23,7 @@ func TestIntegrationClientStartStop(t *testing.T) {
|
||||
t.Cleanup(cancel)
|
||||
|
||||
logger := testhelpers.NewTestLogger(t)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
containerName := "octoplex-test-" + shortid.New().String()
|
||||
component := "test-start-stop"
|
||||
@ -73,7 +73,7 @@ func TestIntegrationClientRemoveContainers(t *testing.T) {
|
||||
t.Cleanup(cancel)
|
||||
|
||||
logger := testhelpers.NewTestLogger(t)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
component := "test-remove-containers"
|
||||
|
||||
@ -172,7 +172,7 @@ func TestContainerRestart(t *testing.T) {
|
||||
t.Cleanup(cancel)
|
||||
|
||||
logger := testhelpers.NewTestLogger(t)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv)
|
||||
apiClient, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
|
||||
require.NoError(t, err)
|
||||
containerName := "octoplex-test-" + shortid.New().String()
|
||||
component := "test-restart"
|
||||
|
5
main.go
5
main.go
@ -76,7 +76,10 @@ func run(ctx context.Context) error {
|
||||
clipboardAvailable = true
|
||||
}
|
||||
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(dockerclient.FromEnv)
|
||||
dockerClient, err := dockerclient.NewClientWithOpts(
|
||||
dockerclient.FromEnv,
|
||||
dockerclient.WithAPIVersionNegotiation(),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("new docker client: %w", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user