@@ -18,7 +18,7 @@ func Test_ServerTerminate(t *testing.T) {
1818
1919 t .Run ("without IP" , core .Test (& core.TestConfig {
2020 Commands : GetCommands (),
21- BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-bionic -w" ),
21+ BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-jammy -w" ),
2222 Cmd : `scw instance server terminate {{ .Server.ID }}` ,
2323 Check : core .TestCheckCombine (
2424 core .TestCheckGolden (),
@@ -38,7 +38,7 @@ func Test_ServerTerminate(t *testing.T) {
3838
3939 t .Run ("with IP" , core .Test (& core.TestConfig {
4040 Commands : GetCommands (),
41- BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-bionic -w" ),
41+ BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-jammy -w" ),
4242 Cmd : `scw instance server terminate {{ .Server.ID }} with-ip=true` ,
4343 Check : core .TestCheckCombine (
4444 core .TestCheckGolden (),
@@ -58,19 +58,22 @@ func Test_ServerTerminate(t *testing.T) {
5858
5959 t .Run ("without block" , core .Test (& core.TestConfig {
6060 Commands : GetCommands (),
61- BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-bionic additional-volumes.0=block:10G -w" ),
61+ BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-jammy additional-volumes.0=block:10G -w" ),
6262 Cmd : `scw instance server terminate {{ .Server.ID }} with-ip=true with-block=false` ,
6363 Check : core .TestCheckCombine (
6464 core .TestCheckGolden (),
6565 core .TestCheckExitCode (0 ),
6666 ),
67- AfterFunc : core .ExecAfterCmd (`scw instance volume delete {{ (index .Server.Volumes "1").ID }}` ),
67+ AfterFunc : core .AfterFuncCombine (
68+ core .ExecAfterCmd (`scw instance volume wait {{ (index .Server.Volumes "1").ID }}` ),
69+ core .ExecAfterCmd (`scw instance volume delete {{ (index .Server.Volumes "1").ID }}` ),
70+ ),
6871 DisableParallel : true ,
6972 }))
7073
7174 t .Run ("with block" , core .Test (& core.TestConfig {
7275 Commands : GetCommands (),
73- BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-bionic additional-volumes.0=block:10G -w" ),
76+ BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create image=ubuntu-jammy additional-volumes.0=block:10G -w" ),
7477 Cmd : `scw instance server terminate {{ .Server.ID }} with-ip=true with-block=true -w` ,
7578 Check : core .TestCheckCombine (
7679 core .TestCheckGolden (),
@@ -96,7 +99,7 @@ func Test_ServerTerminate(t *testing.T) {
9699func Test_ServerBackup (t * testing.T ) {
97100 t .Run ("simple" , core .Test (& core.TestConfig {
98101 Commands : GetCommands (),
99- BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create stopped=true image=ubuntu-bionic " ),
102+ BeforeFunc : core .ExecStoreBeforeCmd ("Server" , "scw instance server create stopped=true image=ubuntu-jammy " ),
100103 Cmd : `scw instance server backup {{ .Server.ID }} name=backup` ,
101104 Check : core .TestCheckCombine (
102105 core .TestCheckGolden (),
0 commit comments