mirror of
https://github.com/moby/moby.git
synced 2025-07-30 18:23:29 +03:00
integration-cli: split DockerSuite into subsequent build suites
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -20,6 +20,14 @@ import (
|
||||
"gotest.tools/v3/poll"
|
||||
)
|
||||
|
||||
func (s *DockerCLIPruneSuite) TearDownTest(c *testing.T) {
|
||||
s.ds.TearDownTest(c)
|
||||
}
|
||||
|
||||
func (s *DockerCLIPruneSuite) OnTimeout(c *testing.T) {
|
||||
s.ds.OnTimeout(c)
|
||||
}
|
||||
|
||||
func pruneNetworkAndVerify(c *testing.T, d *daemon.Daemon, kept, pruned []string) {
|
||||
_, err := d.Cmd("network", "prune", "--force")
|
||||
assert.NilError(c, err)
|
||||
@ -109,7 +117,7 @@ func (s *DockerDaemonSuite) TestPruneImageDangling(c *testing.T) {
|
||||
assert.Assert(c, !strings.Contains(strings.TrimSpace(out), id))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestPruneContainerUntil(c *testing.T) {
|
||||
func (s *DockerCLIPruneSuite) TestPruneContainerUntil(c *testing.T) {
|
||||
out := cli.DockerCmd(c, "run", "-d", "busybox").Combined()
|
||||
id1 := strings.TrimSpace(out)
|
||||
cli.WaitExited(c, id1, 5*time.Second)
|
||||
@ -128,7 +136,7 @@ func (s *DockerSuite) TestPruneContainerUntil(c *testing.T) {
|
||||
assert.Assert(c, strings.Contains(strings.TrimSpace(out), id2))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestPruneContainerLabel(c *testing.T) {
|
||||
func (s *DockerCLIPruneSuite) TestPruneContainerLabel(c *testing.T) {
|
||||
out := cli.DockerCmd(c, "run", "-d", "--label", "foo", "busybox").Combined()
|
||||
id1 := strings.TrimSpace(out)
|
||||
cli.WaitExited(c, id1, 5*time.Second)
|
||||
@ -180,7 +188,7 @@ func (s *DockerSuite) TestPruneContainerLabel(c *testing.T) {
|
||||
assert.Assert(c, !strings.Contains(strings.TrimSpace(out), id2))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestPruneVolumeLabel(c *testing.T) {
|
||||
func (s *DockerCLIPruneSuite) TestPruneVolumeLabel(c *testing.T) {
|
||||
out, _ := dockerCmd(c, "volume", "create", "--label", "foo")
|
||||
id1 := strings.TrimSpace(out)
|
||||
assert.Assert(c, id1 != "")
|
||||
@ -232,7 +240,7 @@ func (s *DockerSuite) TestPruneVolumeLabel(c *testing.T) {
|
||||
assert.Assert(c, !strings.Contains(strings.TrimSpace(out), id2))
|
||||
}
|
||||
|
||||
func (s *DockerSuite) TestPruneNetworkLabel(c *testing.T) {
|
||||
func (s *DockerCLIPruneSuite) TestPruneNetworkLabel(c *testing.T) {
|
||||
dockerCmd(c, "network", "create", "--label", "foo", "n1")
|
||||
dockerCmd(c, "network", "create", "--label", "bar", "n2")
|
||||
dockerCmd(c, "network", "create", "n3")
|
||||
|
Reference in New Issue
Block a user