From 96a5dc1e426367b4406c48c2b886e545d1d0261d Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Fri, 16 Oct 2015 14:51:21 +0200 Subject: [PATCH 1/2] Fix tests --- pkg/commands/create_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/commands/create_test.go b/pkg/commands/create_test.go index c9b1002ba2..d3cca64105 100644 --- a/pkg/commands/create_test.go +++ b/pkg/commands/create_test.go @@ -69,9 +69,10 @@ func TestRunCreate_realAPI(t *testing.T) { err := RunCreate(*scopedCtx, args) So(err, ShouldBeNil) So(scopedStderr.String(), ShouldBeEmpty) - So(scopedStdout.String(), shouldBeAnUUID) uuid := strings.TrimSpace(scopedStdout.String()) + So(uuid, shouldBeAnUUID) + createdUUIDs = append(createdUUIDs, uuid) }) From f735197f7a0b6d6117531773d0962bd65d8d730b Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Fri, 16 Oct 2015 15:10:58 +0200 Subject: [PATCH 2/2] Update test.go --- pkg/commands/test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/commands/test.go b/pkg/commands/test.go index 36d7dc09ed..a88d0c19ca 100644 --- a/pkg/commands/test.go +++ b/pkg/commands/test.go @@ -15,8 +15,7 @@ import ( func shouldBeAnUUID(actual interface{}, expected ...interface{}) string { input := actual.(string) input = strings.TrimSpace(input) - uuid := anonuuid.IsUUID(input) - if uuid == nil { + if err := anonuuid.IsUUID(input); err != nil { return fmt.Sprintf("%q should be an UUID", actual) } return ""