From af2d61921f76cfc0696d4a8caf457fc91ae472d8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 19 Jun 2023 21:54:09 +0300 Subject: get node number correct --- internal/quorum/quorum_test.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'internal/quorum/quorum_test.go') diff --git a/internal/quorum/quorum_test.go b/internal/quorum/quorum_test.go index 169fd33..a5fcbbf 100644 --- a/internal/quorum/quorum_test.go +++ b/internal/quorum/quorum_test.go @@ -42,8 +42,9 @@ func TestScore(t *testing.T) { t.Errorf("Expected scores to be of length 3: %v", scores) } - if scores[0].ID != "bar" || scores[0].Value != 300 { - t.Errorf("Expected score[0] to be {bar,300}: %v", scores[0]) + t.Log(scores) + if scores[0].ID != "bar" || scores[0].Value != 306 { + t.Errorf("Expected score[0] to be {bar,306}: %v", scores[0]) } } @@ -78,8 +79,8 @@ func TestTieScore(t *testing.T) { if len(scores) != 3 { t.Errorf("Expected scores to be of length 3: %v", scores) } - if scores[0].ID != "foo" || scores[0].Value != 300 { - t.Errorf("Expected score[0] to be {foo,300}: %v", scores[0]) + if scores[0].ID != "foo" || scores[0].Value != 309 { + t.Errorf("Expected score[0] to be {foo,309}: %v", scores[0]) } winner := scores[0].ID @@ -101,8 +102,8 @@ func TestTieScore(t *testing.T) { if len(scores) != 3 { t.Errorf("Expected scores to be of length 3: %v", scores) } - if scores[0].ID != "bar" || scores[0].Value != 300 { - t.Errorf("Expected score[0] to be {bar,300}: %v", scores[0]) + if scores[0].ID != "bar" || scores[0].Value != 309 { + t.Errorf("Expected score[0] to be {bar,309}: %v", scores[0]) } winner := scores[0].ID -- cgit v1.2.3