Skip to content

Commit 215f214

Browse files
committed
chore: lint and fix e2e deploy tests with ReplaceContainerOperation
1 parent 53bf446 commit 215f214

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pkg/client/deploy/operation.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ type ReplaceContainerOperation struct {
171171
}
172172

173173
func (o *ReplaceContainerOperation) Execute(ctx context.Context, cli Client) error {
174-
175174
stopFirst := o.Order == api.UpdateOrderStopFirst
176175

177176
if stopFirst {

test/e2e/service_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func TestDeployment(t *testing.T) {
110110

111111
plan, err = deployment.Plan(ctx)
112112
require.NoError(t, err)
113-
assert.Len(t, plan.SequenceOperation.Operations, 6) // 3 run + 3 remove
113+
assert.Len(t, plan.SequenceOperation.Operations, 3) // 3 replace
114114

115115
_, err = deployment.Run(ctx)
116116
require.NoError(t, err)
@@ -150,7 +150,7 @@ func TestDeployment(t *testing.T) {
150150

151151
plan, err = deployment.Plan(ctx)
152152
require.NoError(t, err)
153-
assert.Len(t, plan.SequenceOperation.Operations, 9) // 3 stop + 3 run + 3 remove
153+
assert.Len(t, plan.SequenceOperation.Operations, 3) // 3 replace (stop-first due to port conflicts)
154154

155155
_, err = deployment.Run(ctx)
156156
require.NoError(t, err)
@@ -541,7 +541,7 @@ myapp.example.com {
541541

542542
plan, err = deployment.Plan(ctx)
543543
require.NoError(t, err)
544-
assert.Len(t, plan.Operations, 4, "Expected 2 run + 2 remove operations")
544+
assert.Len(t, plan.Operations, 2, "Expected 2 replace operations")
545545

546546
_, err = deployment.Run(ctx)
547547
require.NoError(t, err)
@@ -593,7 +593,7 @@ myapp.example.com {
593593

594594
plan, err = deployment.Plan(ctx)
595595
require.NoError(t, err)
596-
assert.Len(t, plan.Operations, 8, "Expected 5 run + 3 remove operations")
596+
assert.Len(t, plan.Operations, 5, "Expected 3 replace + 2 run operations")
597597

598598
_, err = deployment.Run(ctx)
599599
require.NoError(t, err)

0 commit comments

Comments
 (0)