Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(test): remove some incompatible in compose test #2623

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions cmd/nerdctl/compose_create_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ services:
}

func TestComposeCreateDependency(t *testing.T) {
// docker-compose v1 depecreated this command
// docker-compose v2 reimplemented this command
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down Expand Up @@ -79,9 +75,6 @@ services:
}

func TestComposeCreatePull(t *testing.T) {
// docker-compose v1 depecreated this command
// docker-compose v2 reimplemented this command
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
Expand Down Expand Up @@ -111,10 +104,6 @@ services:
}

func TestComposeCreateBuild(t *testing.T) {
// docker-compose v1 depecreated this command
// docker-compose v2 reimplemented this command
testutil.DockerIncompatible(t)

const imageSvc0 = "composebuild_svc0"

dockerComposeYAML := fmt.Sprintf(`
Expand Down
5 changes: 1 addition & 4 deletions cmd/nerdctl/compose_down_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ import (
func TestComposeDownRemoveUsedNetwork(t *testing.T) {
base := testutil.NewBase(t)

// The error output is different with docker
testutil.DockerIncompatible(t)

var (
dockerComposeYAMLOrphan = fmt.Sprintf(`
version: '3.1'
Expand Down Expand Up @@ -60,7 +57,7 @@ services:
base.ComposeCmd("-p", projectName, "-f", compFull.YAMLFullPath(), "up", "-d").AssertOK()
defer base.ComposeCmd("-p", projectName, "-f", compFull.YAMLFullPath(), "down", "--remove-orphans").AssertOK()

base.ComposeCmd("-p", projectName, "-f", compOrphan.YAMLFullPath(), "down", "-v").AssertCombinedOutContains("is in use")
base.ComposeCmd("-p", projectName, "-f", compOrphan.YAMLFullPath(), "down", "-v").AssertCombinedOutContains("in use")

}

Expand Down
9 changes: 0 additions & 9 deletions cmd/nerdctl/compose_exec_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ import (
)

func TestComposeExec(t *testing.T) {
// disabling `-it` in `compose exec` is only supported in compose v2.
// Currently CI is using compose v1.
testutil.DockerIncompatible(t)
base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down Expand Up @@ -62,9 +59,6 @@ services:
}

func TestComposeExecWithEnv(t *testing.T) {
// disabling `-it` in `compose exec` is only supported in compose v2.
// Currently CI is using compose v1.
testutil.DockerIncompatible(t)
base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down Expand Up @@ -131,9 +125,6 @@ services:
}

func TestComposeExecWithUser(t *testing.T) {
// disabling `-it` in `compose exec` is only supported in compose v2.
// Currently CI is using compose v1.
testutil.DockerIncompatible(t)
base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down
4 changes: 0 additions & 4 deletions cmd/nerdctl/compose_images_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ volumes:
}

func TestComposeImagesJson(t *testing.T) {
// `--format` is only supported in docker compose v2.
// Currently, CI is using docker compose v1.
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down
4 changes: 0 additions & 4 deletions cmd/nerdctl/compose_kill_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ import (
)

func TestComposeKill(t *testing.T) {
// docker-compose v2 hides exited/killed containers in `compose ps`, and shows
// them if `-a` is passed, which is not supported yet by `nerdctl compose`.
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down
4 changes: 0 additions & 4 deletions cmd/nerdctl/compose_port_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ services:
}

func TestComposePortFailure(t *testing.T) {
// when no port mapping is found, docker compose v1 prints `\n` while v2 prints `:0\n`
// both v1 and v2 have exit code 0 (succeess)
// nerdctl compose will fail with error (no public port found).
testutil.DockerIncompatible(t)
base := testutil.NewBase(t)

var dockerComposeYAML = fmt.Sprintf(`
Expand Down
4 changes: 0 additions & 4 deletions cmd/nerdctl/compose_start_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ services:
}

func TestComposeStartFailWhenServicePause(t *testing.T) {
// Incompatible with docker compose v1. Currently CI is using compose v1.
// Starting a paused container triggers an error in v2 but is ignored in v1.
testutil.DockerIncompatible(t)

base := testutil.NewBase(t)
switch base.Info().CgroupDriver {
case "none", "":
Expand Down
3 changes: 0 additions & 3 deletions cmd/nerdctl/compose_stop_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ import (
)

func TestComposeStop(t *testing.T) {
// docker-compose v2 hides exited/killed containers in `compose ps`, and shows
// them if `-a` is passed, which is not supported yet by `nerdctl compose`.
testutil.DockerIncompatible(t)
base := testutil.NewBase(t)
var dockerComposeYAML = fmt.Sprintf(`
version: '3.1'
Expand Down
Loading