compose/pkg/e2e/model_test.go
Guillaume Lours 8e0d5e17a7 fix: make e2e tests pass reliably locally with Docker Desktop
- Fix stale image/container reuse across test runs                                                                                                                                                                                                                                                          - Add registry readiness check and async removal polling
  - Skip multi-arch test when docker driver supports it
  - Use t.Cleanup for reliable teardown, fix project name mismatches
  - Re-enable 4 previously skipped tests that now pass

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-05-18 10:55:41 +02:00

31 lines
1,011 B
Go

/*
Copyright 2020 Docker Compose CLI authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package e2e
import (
"testing"
)
func TestComposeModel(t *testing.T) {
if _, err := findPluginExecutable(DockerModelExecutableName); err != nil {
t.Skip("docker-model plugin not available")
}
c := NewParallelCLI(t)
defer c.cleanupWithDown(t, "model-test")
c.RunDockerComposeCmd(t, "-p", "model-test", "-f", "./fixtures/model/compose.yaml", "run", "--rm", "test", "sh", "-c", "curl ${FOO_URL}")
}