Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
remyleone committed May 5, 2020
1 parent 1e778e3 commit 527e4b5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/instance/v1/image_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestWaitForImage(t *testing.T) {
func createImage(t *testing.T, instanceAPI *API, imageName string) (*Image, func()) {
serverRes, err := instanceAPI.CreateServer(&CreateServerRequest{
CommercialType: "DEV1-M",
Image: "ubuntu-focal",
Image: "ubuntu_focal",
})
testhelpers.AssertNoError(t, err)

Expand Down
4 changes: 2 additions & 2 deletions api/instance/v1/server_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ func TestAPI_CreateServer(t *testing.T) {
res, err := instanceAPI.CreateServer(&CreateServerRequest{
Zone: scw.ZoneFrPar1,
CommercialType: "GP1-XS",
Image: "ubuntu-focal",
Image: "ubuntu_focal",
})

testhelpers.AssertNoError(t, err)
// this UUID might change when running the cassette later when the image "ubuntu-focal" got a new version
// this UUID might change when running the cassette later when the image "ubuntu_focal" got a new version
testhelpers.Equals(t, "ce6c9d21-0ff3-4355-b385-c930c9f22d9d", res.Server.Image.ID)
err = instanceAPI.DeleteServer(&DeleteServerRequest{
Zone: scw.ZoneFrPar1,
Expand Down
2 changes: 1 addition & 1 deletion api/instance/v1/snapshot_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestWaitForSnapshot(t *testing.T) {
func createSnapshot(t *testing.T, instanceAPI *API, snapshotName string) (*Snapshot, func()) {
serverRes, err := instanceAPI.CreateServer(&CreateServerRequest{
CommercialType: "DEV1-M",
Image: "ubuntu-focal",
Image: "ubuntu_focal",
})
testhelpers.AssertNoError(t, err)

Expand Down
8 changes: 4 additions & 4 deletions api/marketplace/v1/marketplace_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ func TestGetImageByLabel(t *testing.T) {
imageID, err := marketplaceAPI.GetLocalImageIDByLabel(&GetLocalImageIDByLabelRequest{
Zone: scw.ZoneFrPar1,
CommercialType: "DEV1-S",
ImageLabel: "ubuntu-focal",
ImageLabel: "ubuntu_focal",
})
testhelpers.AssertNoError(t, err)

// ubuntu-focal DEV1-S at par1: ce6c9d21-0ff3-4355-b385-c930c9f22d9d
// ubuntu_focal DEV1-S at par1: ce6c9d21-0ff3-4355-b385-c930c9f22d9d
testhelpers.Equals(t, "ce6c9d21-0ff3-4355-b385-c930c9f22d9d", imageID)
})

Expand All @@ -37,11 +37,11 @@ func TestGetImageByLabel(t *testing.T) {
imageID, err := marketplaceAPI.GetLocalImageIDByLabel(&GetLocalImageIDByLabelRequest{
Zone: scw.ZoneFrPar1,
CommercialType: "dev1-s",
ImageLabel: "ubuntu-focal",
ImageLabel: "ubuntu_focal",
})
testhelpers.AssertNoError(t, err)

// ubuntu-focal DEV1-S at par1: ce6c9d21-0ff3-4355-b385-c930c9f22d9d
// ubuntu_focal DEV1-S at par1: ce6c9d21-0ff3-4355-b385-c930c9f22d9d
testhelpers.Equals(t, "ce6c9d21-0ff3-4355-b385-c930c9f22d9d", imageID)
})

Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func Example_createServer() {
instanceAPI := instance.NewAPI(client)

serverType := "DEV1-S"
image := "ubuntu-focal"
image := "ubuntu_focal"

// Create a new DEV1-S server
createRes, err := instanceAPI.CreateServer(&instance.CreateServerRequest{
Expand Down

0 comments on commit 527e4b5

Please sign in to comment.