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:
@@ -25,6 +25,16 @@ func TestServicePlan_FormatSummary(t *testing.T) {
|
||||
},
|
||||
expected: "2 update (in place) · across 2 machines",
|
||||
},
|
||||
{
|
||||
name: "stop operations not counted as they are followed by remove",
|
||||
ops: []operation.Operation{
|
||||
&operation.StopContainerOperation{MachineID: "m-1"},
|
||||
&operation.StopContainerOperation{MachineID: "m-1"},
|
||||
&operation.ReplaceContainerOperation{MachineID: "m-1", Order: api.UpdateOrderStopFirst},
|
||||
&operation.RemoveContainerOperation{MachineID: "m-1"},
|
||||
},
|
||||
expected: "1 replace (stop-first) · 1 remove · across 1 machine",
|
||||
},
|
||||
{
|
||||
name: "all operation types",
|
||||
ops: []operation.Operation{
|
||||
|
||||
Reference in New Issue
Block a user