Skip to content

Commit 14607da

Browse files
committed
remove Interactive and DisableParallel from Test_ServerTerminate
1 parent f95fae5 commit 14607da

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

internal/namespaces/instance/v1/custom_server_action_test.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"testing"
55

66
"github.com/scaleway/scaleway-cli/v2/core"
7-
"github.com/scaleway/scaleway-cli/v2/internal/interactive"
87
block "github.com/scaleway/scaleway-cli/v2/internal/namespaces/block/v1alpha1"
98
"github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1"
109
"github.com/scaleway/scaleway-cli/v2/internal/testhelpers"
@@ -18,15 +17,13 @@ import (
1817
// These tests needs to be run in sequence
1918
// since they are using the interactive print
2019
func Test_ServerTerminate(t *testing.T) {
21-
interactive.IsInteractive = true
22-
2320
t.Run("without IP", core.Test(&core.TestConfig{
2421
Commands: instance.GetCommands(),
2522
BeforeFunc: core.ExecStoreBeforeCmd(
2623
"Server",
27-
testServerCommand("image=ubuntu-jammy ip=new -w"),
24+
testServerCommand("image=ubuntu-jammy ip=new root-volume=local:10GB -w"),
2825
),
29-
Cmd: `scw instance server terminate {{ .Server.ID }} with-block=true`,
26+
Cmd: `scw instance server terminate {{ .Server.ID }}`,
3027
Check: core.TestCheckCombine(
3128
core.TestCheckGolden(),
3229
core.TestCheckExitCode(0),
@@ -48,16 +45,15 @@ func Test_ServerTerminate(t *testing.T) {
4845
AfterFunc: core.ExecAfterCmd(
4946
`scw instance ip delete {{ index .Server.PublicIP.ID }}`,
5047
),
51-
DisableParallel: true,
5248
}))
5349

5450
t.Run("with IP", core.Test(&core.TestConfig{
5551
Commands: instance.GetCommands(),
5652
BeforeFunc: core.ExecStoreBeforeCmd(
5753
"Server",
58-
testServerCommand("image=ubuntu-jammy ip=new -w"),
54+
testServerCommand("image=ubuntu-jammy ip=new root-volume=local:10GB -w"),
5955
),
60-
Cmd: `scw instance server terminate {{ .Server.ID }} with-ip=true with-block=true`,
56+
Cmd: `scw instance server terminate {{ .Server.ID }} with-ip=true`,
6157
Check: core.TestCheckCombine(
6258
core.TestCheckGolden(),
6359
core.TestCheckExitCode(0),
@@ -77,7 +73,6 @@ func Test_ServerTerminate(t *testing.T) {
7773
require.IsType(t, &scw.PermissionsDeniedError{}, err)
7874
},
7975
),
80-
DisableParallel: true,
8176
}))
8277

8378
t.Run("without block", core.Test(&core.TestConfig{
@@ -104,7 +99,6 @@ func Test_ServerTerminate(t *testing.T) {
10499
),
105100
core.ExecAfterCmd(`scw block volume delete {{ (index .Server.Volumes "0").ID }}`),
106101
),
107-
DisableParallel: true,
108102
}))
109103

110104
t.Run("with block", core.Test(&core.TestConfig{
@@ -141,10 +135,7 @@ func Test_ServerTerminate(t *testing.T) {
141135
require.IsType(t, &scw.ResourceNotFoundError{}, err)
142136
},
143137
),
144-
DisableParallel: true,
145138
}))
146-
147-
interactive.IsInteractive = false
148139
}
149140

150141
// These tests needs to be run in sequence

0 commit comments

Comments
 (0)