Skip to content

Commit 6ed74eb

Browse files
authored
chore: bump scaleway sdk-go (#3437)
1 parent af247ac commit 6ed74eb

24 files changed

+9164
-4546
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231013121452-68e8fa55d026
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231016143828-0e00839bc858
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.7.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
487487
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
488488
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
489489
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
490-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231013121452-68e8fa55d026 h1:FsMuPbeCxvPMR/oqn7hz/OjG1LjDkeL0iUCnNdpjmEA=
491-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231013121452-68e8fa55d026/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
490+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231016143828-0e00839bc858 h1:mXPRDjvAAxrfb/fmOXduTTNaO6PoWs31OG3KORMQoT0=
491+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.21.0.20231016143828-0e00839bc858/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
492492
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
493493
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
494494
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/instance/v1/custom_image_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
func Test_ImageCreate(t *testing.T) {
1313
t.Run("Create simple image", core.Test(&core.TestConfig{
1414
BeforeFunc: core.BeforeFuncCombine(
15-
createServer("Server"),
15+
createServerBionic("Server"),
1616
core.ExecStoreBeforeCmd("Snapshot", `scw instance snapshot create volume-id={{ (index .Server.Volumes "0").ID }}`),
1717
),
1818
Commands: GetCommands(),
@@ -72,7 +72,7 @@ func Test_ImageDelete(t *testing.T) {
7272

7373
func createImage(metaKey string) core.BeforeFunc {
7474
return core.BeforeFuncCombine(
75-
createServer("Server"),
75+
createServerBionic("Server"),
7676
core.ExecStoreBeforeCmd("Snapshot", `scw instance snapshot create volume-id={{ (index .Server.Volumes "0").ID }}`),
7777
core.ExecStoreBeforeCmd(metaKey, `scw instance image create snapshot-id={{ .Snapshot.Snapshot.ID }} arch=x86_64`),
7878
)

internal/namespaces/instance/v1/custom_privatenics_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func Test_ListNICs(t *testing.T) {
1515
Commands: cmds,
1616
BeforeFunc: core.BeforeFuncCombine(
1717
createPN(),
18-
createServer("Server"),
18+
createServerBionic("Server"),
1919
createNIC(),
2020
),
2121
Cmd: "scw instance private-nic list server-id={{ .Server.ID }}",
@@ -46,7 +46,7 @@ func Test_GetPrivateNIC(t *testing.T) {
4646
Commands: cmds,
4747
BeforeFunc: core.BeforeFuncCombine(
4848
createPN(),
49-
createServer("Server"),
49+
createServerBionic("Server"),
5050
createNIC(),
5151
),
5252
Cmd: "scw instance private-nic get server-id={{ .Server.ID }} private-nic-id={{ .NIC.PrivateNic.MacAddress }}",

internal/namespaces/instance/v1/custom_server_create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ func Test_CreateServer(t *testing.T) {
2323
t.Run("Simple", func(t *testing.T) {
2424
t.Run("Default", core.Test(&core.TestConfig{
2525
Commands: GetCommands(),
26-
Cmd: "scw instance server create image=ubuntu_bionic stopped=true",
26+
Cmd: "scw instance server create image=ubuntu_jammy stopped=true",
2727
Check: core.TestCheckCombine(
2828
core.TestCheckGolden(),
2929
func(t *testing.T, ctx *core.CheckFuncCtx) {
30-
assert.Equal(t, "Ubuntu 18.04 Bionic Beaver", ctx.Result.(*instance.Server).Image.Name)
30+
assert.Equal(t, "Ubuntu 22.04 Jammy Jellyfish", ctx.Result.(*instance.Server).Image.Name)
3131
},
3232
core.TestCheckExitCode(0),
3333
),

internal/namespaces/instance/v1/custom_server_ssh_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ func Test_ServerSSH(t *testing.T) {
1010
t.Run("Simple", core.Test(&core.TestConfig{
1111
Commands: GetCommands(),
1212
BeforeFunc: core.BeforeFuncCombine(
13-
createServer("Server"),
13+
createServerBionic("Server"),
1414
startServer("Server"),
1515
),
1616
Cmd: "scw instance server ssh {{ .Server.ID }}",
@@ -29,7 +29,7 @@ func Test_ServerSSH(t *testing.T) {
2929
t.Run("With-Exit-Code", core.Test(&core.TestConfig{
3030
Commands: GetCommands(),
3131
BeforeFunc: core.BeforeFuncCombine(
32-
createServer("Server"),
32+
createServerBionic("Server"),
3333
startServer("Server"),
3434
),
3535
Cmd: "scw instance server ssh {{ .Server.ID }}",
@@ -47,7 +47,7 @@ func Test_ServerSSH(t *testing.T) {
4747

4848
t.Run("Stopped server", core.Test(&core.TestConfig{
4949
Commands: GetCommands(),
50-
BeforeFunc: createServer("Server"),
50+
BeforeFunc: createServerBionic("Server"),
5151
Cmd: "scw instance server ssh {{ .Server.ID }}",
5252
Check: core.TestCheckCombine(
5353
core.TestCheckGolden(),

internal/namespaces/instance/v1/custom_server_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func Test_ServerVolumeUpdate(t *testing.T) {
1616
t.Run("simple block volume", core.Test(&core.TestConfig{
1717
Commands: GetCommands(),
1818
BeforeFunc: core.BeforeFuncCombine(
19-
createServer("Server"),
19+
createServerBionic("Server"),
2020
createVolume("Volume", 10, instance.VolumeVolumeTypeBSSD),
2121
),
2222
Cmd: "scw instance server attach-volume server-id={{ .Server.ID }} volume-id={{ .Volume.ID }}",
@@ -33,7 +33,7 @@ func Test_ServerVolumeUpdate(t *testing.T) {
3333
t.Run("simple local volume", core.Test(&core.TestConfig{
3434
Commands: GetCommands(),
3535
BeforeFunc: core.BeforeFuncCombine(
36-
createServer("Server"),
36+
createServerBionic("Server"),
3737
createVolume("Volume", 10, instance.VolumeVolumeTypeLSSD),
3838
),
3939
Cmd: "scw instance server attach-volume server-id={{ .Server.ID }} volume-id={{ .Volume.ID }}",
@@ -49,7 +49,7 @@ func Test_ServerVolumeUpdate(t *testing.T) {
4949

5050
t.Run("invalid volume UUID", core.Test(&core.TestConfig{
5151
Commands: GetCommands(),
52-
BeforeFunc: createServer("Server"),
52+
BeforeFunc: createServerBionic("Server"),
5353
Cmd: "scw instance server attach-volume server-id={{ .Server.ID }} volume-id=11111111-1111-1111-1111-111111111111",
5454
Check: core.TestCheckCombine(
5555
core.TestCheckGolden(),
@@ -79,7 +79,7 @@ func Test_ServerVolumeUpdate(t *testing.T) {
7979

8080
t.Run("invalid volume UUID", core.Test(&core.TestConfig{
8181
Commands: GetCommands(),
82-
BeforeFunc: createServer("Server"),
82+
BeforeFunc: createServerBionic("Server"),
8383
Cmd: "scw instance server detach-volume volume-id=11111111-1111-1111-1111-111111111111",
8484
Check: core.TestCheckCombine(
8585
core.TestCheckGolden(),
@@ -95,7 +95,7 @@ func Test_ServerUpdateCustom(t *testing.T) {
9595
// IP cases.
9696
t.Run("Try to remove ip from server without ip", core.Test(&core.TestConfig{
9797
Commands: GetCommands(),
98-
BeforeFunc: createServer("Server"),
98+
BeforeFunc: createServerBionic("Server"),
9999
Cmd: "scw instance server update {{ .Server.ID }} ip=none",
100100
Check: core.TestCheckCombine(
101101
func(t *testing.T, ctx *core.CheckFuncCtx) {
@@ -109,7 +109,7 @@ func Test_ServerUpdateCustom(t *testing.T) {
109109
t.Run("Update server ip from server without ip", core.Test(&core.TestConfig{
110110
Commands: GetCommands(),
111111
BeforeFunc: core.BeforeFuncCombine(
112-
createServer("Server"),
112+
createServerBionic("Server"),
113113
createIP("IP"),
114114
),
115115
Cmd: "scw instance server update {{ .Server.ID }} ip={{ .IP.Address }}",
@@ -125,7 +125,7 @@ func Test_ServerUpdateCustom(t *testing.T) {
125125
t.Run("Update server ip from server with ip", core.Test(&core.TestConfig{
126126
Commands: GetCommands(),
127127
BeforeFunc: core.BeforeFuncCombine(
128-
createServer("Server"),
128+
createServerBionic("Server"),
129129
createIP("IP1"),
130130
createIP("IP2"),
131131

@@ -205,7 +205,7 @@ func Test_ServerUpdateCustom(t *testing.T) {
205205
t.Run("valid simple block volume", core.Test(&core.TestConfig{
206206
Commands: GetCommands(),
207207
BeforeFunc: core.BeforeFuncCombine(
208-
createServer("Server"),
208+
createServerBionic("Server"),
209209
createVolume("Volume", 10, instance.VolumeVolumeTypeBSSD),
210210
),
211211
Cmd: `scw instance server update {{ .Server.ID }} volume-ids.0={{ (index .Server.Volumes "0").ID }} volume-ids.1={{ .Volume.ID }}`,

internal/namespaces/instance/v1/custom_ssh_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func Test_SSHConfigInstall(t *testing.T) {
1616
t.Run("Install config and create default", core.Test(&core.TestConfig{
1717
TmpHomeDir: true,
1818
Commands: GetCommands(),
19-
BeforeFunc: createServer("Server"),
19+
BeforeFunc: createServerBionic("Server"),
2020
Args: []string{"scw", "instance", "ssh", "install-config"},
2121
Check: core.TestCheckCombine(
2222
core.TestCheckGoldenAndReplacePatterns(
@@ -56,7 +56,7 @@ func Test_SSHConfigInstall(t *testing.T) {
5656

5757
return nil
5858
},
59-
createServer("Server"),
59+
createServerBionic("Server"),
6060
),
6161
Args: []string{"scw", "instance", "ssh", "install-config"},
6262
Check: core.TestCheckCombine(

internal/namespaces/instance/v1/custom_ssh_key_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func Test_SSHKey(t *testing.T) {
3737

3838
t.Run("Add key", core.Test(&core.TestConfig{
3939
Commands: GetCommands(),
40-
BeforeFunc: createServer("Server"),
40+
BeforeFunc: createServerBionic("Server"),
4141
Args: []string{"scw", "instance", "ssh", "add-key", "server-id={{.Server.ID}}", "public-key=" + sshKey},
4242
Check: core.TestCheckCombine(
4343
core.TestCheckGolden(),
@@ -57,7 +57,7 @@ func Test_SSHKey(t *testing.T) {
5757
t.Run("List keys", core.Test(&core.TestConfig{
5858
Commands: GetCommands(),
5959
BeforeFunc: core.BeforeFuncCombine(
60-
createServer("Server"),
60+
createServerBionic("Server"),
6161
addSSHKey("Server", sshKey),
6262
addSSHKey("Server", sshKey2),
6363
),
@@ -76,7 +76,7 @@ func Test_SSHKey(t *testing.T) {
7676
t.Run("Remove key", core.Test(&core.TestConfig{
7777
Commands: GetCommands(),
7878
BeforeFunc: core.BeforeFuncCombine(
79-
createServer("Server"),
79+
createServerBionic("Server"),
8080
addSSHKey("Server", sshKey),
8181
addSSHKey("Server", sshKey2),
8282
),

internal/namespaces/instance/v1/custom_user_data_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func Test_UserDataGet(t *testing.T) {
1111
t.Run("Get an existing key", core.Test(&core.TestConfig{
1212
BeforeFunc: core.BeforeFuncCombine(
13-
createServer("Server"),
13+
createServerBionic("Server"),
1414
core.ExecBeforeCmd("scw instance user-data set server-id={{.Server.ID}} key=happy content=true"),
1515
),
1616
Commands: GetCommands(),
@@ -23,7 +23,7 @@ func Test_UserDataGet(t *testing.T) {
2323
}))
2424

2525
t.Run("Get an nonexistent key", core.Test(&core.TestConfig{
26-
BeforeFunc: createServer("Server"),
26+
BeforeFunc: createServerBionic("Server"),
2727
Commands: GetCommands(),
2828
Cmd: "scw instance user-data get server-id={{.Server.ID}} key=happy",
2929
AfterFunc: deleteServer("Server"),
@@ -37,7 +37,7 @@ func Test_UserDataGet(t *testing.T) {
3737
func Test_UserDataList(t *testing.T) {
3838
t.Run("Simple", core.Test(&core.TestConfig{
3939
BeforeFunc: core.BeforeFuncCombine(
40-
createServer("Server"),
40+
createServerBionic("Server"),
4141
core.ExecBeforeCmd("scw instance user-data set server-id={{ .Server.ID }} key=foo content=bar"),
4242
core.ExecBeforeCmd("scw instance user-data set server-id={{ .Server.ID }} key=bar content=foo"),
4343
),

0 commit comments

Comments
 (0)