Files
docker-cli/cli/command/system/prune_test.go
T
Daniel Nephin 93615dd967 Update some assertions.
and fix some tests

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-05 17:15:24 -05:00

22 lines
562 B
Go

package system
import (
"testing"
"github.com/docker/cli/internal/test"
"github.com/stretchr/testify/assert"
)
func TestPrunePromptPre131DoesNotIncludeBuildCache(t *testing.T) {
cli := test.NewFakeCli(&fakeClient{version: "1.30"})
cmd := newPruneCommand(cli)
assert.NoError(t, cmd.Execute())
expected := `WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
Are you sure you want to continue? [y/N] `
assert.Equal(t, expected, cli.OutBuffer().String())
}