Skip to content

Commit 7a1add2

Browse files
author
Quentin Perez
committed
Merge pull request #218 from scaleway/moul-patch-2
Fix tests
2 parents 900f351 + f735197 commit 7a1add2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/commands/create_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ func TestRunCreate_realAPI(t *testing.T) {
6969
err := RunCreate(*scopedCtx, args)
7070
So(err, ShouldBeNil)
7171
So(scopedStderr.String(), ShouldBeEmpty)
72-
So(scopedStdout.String(), shouldBeAnUUID)
7372

7473
uuid := strings.TrimSpace(scopedStdout.String())
74+
So(uuid, shouldBeAnUUID)
75+
7576
createdUUIDs = append(createdUUIDs, uuid)
7677
})
7778

pkg/commands/test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import (
1515
func shouldBeAnUUID(actual interface{}, expected ...interface{}) string {
1616
input := actual.(string)
1717
input = strings.TrimSpace(input)
18-
uuid := anonuuid.IsUUID(input)
19-
if uuid == nil {
18+
if err := anonuuid.IsUUID(input); err != nil {
2019
return fmt.Sprintf("%q should be an UUID", actual)
2120
}
2221
return ""

0 commit comments

Comments
 (0)