Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix integration tests #568

Merged
merged 2 commits into from
Sep 3, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/api/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"strings"
"sync"

"moul.io/anonuuid"
"github.com/renstrom/fuzzysearch/fuzzy"
"moul.io/anonuuid"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (

"github.com/docker/docker/pkg/namesgenerator"
"github.com/dustin/go-humanize"
"moul.io/anonuuid"
"github.com/scaleway/scaleway-cli/pkg/utils"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus"
"moul.io/anonuuid"
)

// ScalewayResolvedIdentifier represents a list of matching identifier for a specifier pattern
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package api

import (
. "github.com/smartystreets/goconvey/convey"
"testing"

. "github.com/smartystreets/goconvey/convey"
)

type VolumesFromSizeCase struct {
Expand Down
8 changes: 4 additions & 4 deletions pkg/commands/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func ExampleRunCreate_complex() {
Bootscript: "rescue",
Tags: []string{"tag1", "tag2"},
Volumes: []string{},
Image: "ubuntu-wily",
Image: "ubuntu-bionic",
TmpSSHKey: false,
}
RunCreate(ctx, args)
Expand Down Expand Up @@ -59,11 +59,11 @@ func TestRunCreate_realAPI(t *testing.T) {
})
*/

Convey("--name=unittest-create-standard wily", func() {
Convey("--name=unittest-create-standard ubuntu-xenial", func() {
args := CreateArgs{
Name: "unittest-create-standard",
Image: "ubuntu-mini-xenial-25g",
CommercialType: "X64-2GB",
Image: "ubuntu-xenial",
CommercialType: "X64-15GB",
IP: "dynamic",
BootType: "bootscript",
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/commands/history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func TestRunHistory_realAPI(t *testing.T) {
t.Skip()
}
Convey("Testing RunHistory() on real API", t, func() {
Convey("ubuntu-wily", func() {
Convey("ubuntu-bionic", func() {
args := HistoryArgs{
NoTrunc: false,
Quiet: false,
Image: "ubuntu-wily",
Image: "ubuntu-bionic",
Arch: "arm",
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/commands/inspect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ func TestRunInspect_realAPI(t *testing.T) {
t.Skip()
}
Convey("Testing RunInspect() on real API", t, func() {
Convey("image:ubuntu-wily", func() {
Convey("image:ubuntu-bionic", func() {
args := InspectArgs{
Format: "",
Browser: false,
Identifiers: []string{"image:ubuntu-wily"},
Identifiers: []string{"image:ubuntu-bionic"},
Arch: "arm",
}

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

Convey("-f \"{{.Identifier}}\" image:ubuntu-wily", func() {
Convey("-f \"{{.Identifier}}\" image:ubuntu-bionic", func() {
args := InspectArgs{
Format: "{{.Identifier}}",
Browser: false,
Identifiers: []string{"image:ubuntu-wily"},
Identifiers: []string{"image:ubuntu-bionic"},
Arch: "arm",
}

Expand Down
5 changes: 3 additions & 2 deletions pkg/commands/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ package commands
import (
"encoding/json"
"fmt"
minio "github.com/minio/mc/cmd"
"github.com/scaleway/scaleway-cli/pkg/config"
"io/ioutil"
"os"
"path/filepath"
"strings"

minio "github.com/minio/mc/cmd"
"github.com/scaleway/scaleway-cli/pkg/config"
)

type clientHost struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"os"
"strings"

"moul.io/anonuuid"
"github.com/scaleway/scaleway-cli/pkg/api"
"github.com/scaleway/scaleway-cli/pkg/config"
"github.com/scaleway/scaleway-cli/pkg/scwversion"
"github.com/sirupsen/logrus"
"moul.io/anonuuid"
)

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