From 9f04fc2f7b31aeefa8281aff0d1d40a698f4b627 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Thu, 19 Jul 2018 17:58:15 +0200 Subject: bug: replace the uuid based id with the hash of the first commit --- tests/bug_test.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/bug_test.go b/tests/bug_test.go index 175df1a8..e0737d1c 100644 --- a/tests/bug_test.go +++ b/tests/bug_test.go @@ -11,9 +11,15 @@ func TestBugId(t *testing.T) { t.Error(err) } - if len(bug1.Id()) == 0 { - t.Fatal("Bug doesn't have a human readable identifier") + bug1.Append(createOp) + + err = bug1.Commit(mockRepo) + + if err != nil { + t.Fatal(err) } + + bug1.Id() } func TestBugValidity(t *testing.T) { @@ -38,7 +44,11 @@ func TestBugValidity(t *testing.T) { t.Fatal("Bug with multiple CreateOp should be invalid") } - bug1.Commit(mockRepo) + err = bug1.Commit(mockRepo) + + if err != nil { + t.Fatal(err) + } if bug1.IsValid() { t.Fatal("Bug with multiple CreateOp should be invalid") -- cgit