mirror of
https://github.com/psviderski/uncloud.git
synced 2026-11-10 12:44:16 +00:00
fix(plan): make stop operation formatting consistent and do not count it as removal in summary
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/charmbracelet/x/ansi"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/volume"
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
@@ -12,6 +13,18 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestStopContainerOperation_Format(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
op := &StopContainerOperation{
|
||||
ServiceName: "app",
|
||||
ContainerID: "0f6df6593e1b0123456789abcdef",
|
||||
MachineName: "machine-1",
|
||||
}
|
||||
|
||||
assert.Equal(t, "- stop container app/0f6df6593e1b on machine-1", ansi.Strip(op.Format()))
|
||||
}
|
||||
|
||||
func TestReplaceContainerOperation_StopFirstPreparation(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user