Skip to content

Commit

Permalink
tests(instance): remove unsupported routed ip test
Browse files Browse the repository at this point in the history
We cannot create a server without routed-ip supported anymore
  • Loading branch information
Codelax committed Oct 23, 2024
1 parent 8a4237a commit 004be26
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 3,488 deletions.
32 changes: 0 additions & 32 deletions internal/namespaces/instance/v1/custom_server_action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,35 +141,3 @@ func Test_ServerAction(t *testing.T) {
),
}))
}

func Test_ServerEnableRoutedIP(t *testing.T) {
t.Run("simple", core.Test(&core.TestConfig{
Commands: instance.GetCommands(),
BeforeFunc: core.ExecStoreBeforeCmd("Server", "scw instance server create zone=fr-par-3 type=PRO2-XXS image=ubuntu_jammy routed-ip-enabled=false ip=new --wait"),
Cmd: `scw instance server enable-routed-ip zone=fr-par-3 {{ .Server.ID }} --wait`,
Check: core.TestCheckCombine(
func(t *testing.T, ctx *core.CheckFuncCtx) {
t.Helper()
storedServer := ctx.Meta["Server"].(*instanceSDK.Server)
api := instanceSDK.NewAPI(ctx.Client)
server, err := api.GetServer(&instanceSDK.GetServerRequest{
Zone: storedServer.Zone,
ServerID: storedServer.ID,
})
assert.Nil(t, err)
assert.Equal(t, scw.BoolPtr(true), server.Server.RoutedIPEnabled) //nolint: staticcheck // Field is deprecated but tested
ip, err := api.GetIP(&instanceSDK.GetIPRequest{
Zone: storedServer.Zone,
IP: storedServer.PublicIP.ID,
})
assert.Nil(t, err)
assert.Equal(t, instanceSDK.IPTypeRoutedIPv4, ip.IP.Type)
},
core.TestCheckGolden(),
core.TestCheckExitCode(0),
),
AfterFunc: core.AfterFuncCombine(
core.ExecAfterCmd("scw instance server delete zone=fr-par-3 {{ .Server.ID }} force-shutdown=true with-ip=true with-volumes=local"),
),
}))
}
Loading

0 comments on commit 004be26

Please sign in to comment.