Skip to content

Commit 503d2c2

Browse files
feat: fix integration tests
1 parent 36e5da9 commit 503d2c2

File tree

8 files changed

+19
-17
lines changed

8 files changed

+19
-17
lines changed

pkg/api/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"strings"
1515
"sync"
1616

17-
"moul.io/anonuuid"
1817
"github.com/renstrom/fuzzysearch/fuzzy"
18+
"moul.io/anonuuid"
1919
)
2020

2121
const (

pkg/api/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import (
1515

1616
"github.com/docker/docker/pkg/namesgenerator"
1717
"github.com/dustin/go-humanize"
18-
"moul.io/anonuuid"
1918
"github.com/scaleway/scaleway-cli/pkg/utils"
2019
"github.com/sirupsen/logrus"
2120
log "github.com/sirupsen/logrus"
21+
"moul.io/anonuuid"
2222
)
2323

2424
// ScalewayResolvedIdentifier represents a list of matching identifier for a specifier pattern

pkg/api/helpers_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package api
22

33
import (
4-
. "github.com/smartystreets/goconvey/convey"
54
"testing"
5+
6+
. "github.com/smartystreets/goconvey/convey"
67
)
78

89
type VolumesFromSizeCase struct {

pkg/commands/create_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func ExampleRunCreate_complex() {
2424
Bootscript: "rescue",
2525
Tags: []string{"tag1", "tag2"},
2626
Volumes: []string{},
27-
Image: "ubuntu-wily",
27+
Image: "ubuntu-bionic",
2828
TmpSSHKey: false,
2929
}
3030
RunCreate(ctx, args)
@@ -59,11 +59,11 @@ func TestRunCreate_realAPI(t *testing.T) {
5959
})
6060
*/
6161

62-
Convey("--name=unittest-create-standard wily", func() {
62+
Convey("--name=unittest-create-standard ubuntu-bionic", func() {
6363
args := CreateArgs{
6464
Name: "unittest-create-standard",
65-
Image: "ubuntu-mini-xenial-25g",
66-
CommercialType: "X64-2GB",
65+
Image: "ubuntu-bionic",
66+
CommercialType: "DEV1-S",
6767
IP: "dynamic",
6868
BootType: "bootscript",
6969
}

pkg/commands/history_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ func TestRunHistory_realAPI(t *testing.T) {
3434
t.Skip()
3535
}
3636
Convey("Testing RunHistory() on real API", t, func() {
37-
Convey("ubuntu-wily", func() {
37+
Convey("ubuntu-bionic", func() {
3838
args := HistoryArgs{
3939
NoTrunc: false,
4040
Quiet: false,
41-
Image: "ubuntu-wily",
41+
Image: "ubuntu-bionic",
4242
Arch: "arm",
4343
}
4444

pkg/commands/inspect_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ func TestRunInspect_realAPI(t *testing.T) {
3636
t.Skip()
3737
}
3838
Convey("Testing RunInspect() on real API", t, func() {
39-
Convey("image:ubuntu-wily", func() {
39+
Convey("image:ubuntu-bionic", func() {
4040
args := InspectArgs{
4141
Format: "",
4242
Browser: false,
43-
Identifiers: []string{"image:ubuntu-wily"},
43+
Identifiers: []string{"image:ubuntu-bionic"},
4444
Arch: "arm",
4545
}
4646

@@ -54,13 +54,13 @@ func TestRunInspect_realAPI(t *testing.T) {
5454
So(err, ShouldBeNil)
5555
So(len(results), ShouldEqual, 1)
5656
So(strings.ToLower(results[0].Name), ShouldContainSubstring, "ubuntu")
57-
So(strings.ToLower(results[0].Name), ShouldContainSubstring, "wily")
57+
So(strings.ToLower(results[0].Name), ShouldContainSubstring, "bionic")
5858

59-
Convey("-f \"{{.Identifier}}\" image:ubuntu-wily", func() {
59+
Convey("-f \"{{.Identifier}}\" image:ubuntu-bionic", func() {
6060
args := InspectArgs{
6161
Format: "{{.Identifier}}",
6262
Browser: false,
63-
Identifiers: []string{"image:ubuntu-wily"},
63+
Identifiers: []string{"image:ubuntu-bionic"},
6464
Arch: "arm",
6565
}
6666

pkg/commands/s3.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ package commands
77
import (
88
"encoding/json"
99
"fmt"
10-
minio "github.com/minio/mc/cmd"
11-
"github.com/scaleway/scaleway-cli/pkg/config"
1210
"io/ioutil"
1311
"os"
1412
"path/filepath"
1513
"strings"
14+
15+
minio "github.com/minio/mc/cmd"
16+
"github.com/scaleway/scaleway-cli/pkg/config"
1617
)
1718

1819
type clientHost struct {

pkg/commands/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import (
66
"os"
77
"strings"
88

9-
"moul.io/anonuuid"
109
"github.com/scaleway/scaleway-cli/pkg/api"
1110
"github.com/scaleway/scaleway-cli/pkg/config"
1211
"github.com/scaleway/scaleway-cli/pkg/scwversion"
1312
"github.com/sirupsen/logrus"
13+
"moul.io/anonuuid"
1414
)
1515

1616
func shouldBeAnUUID(actual interface{}, expected ...interface{}) string {

0 commit comments

Comments
 (0)