diff options
| author | Paul Buetow <paul@buetow.org> | 2023-06-19 21:54:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-06-19 21:54:09 +0300 |
| commit | af2d61921f76cfc0696d4a8caf457fc91ae472d8 (patch) | |
| tree | 05a7fa24bd82972465a7d77d6542f703c1b29cde /internal/quorum/quorum_test.go | |
| parent | dbf23cb423b15fd94930b042f402dfa8d8a76a17 (diff) | |
get node number correct
Diffstat (limited to 'internal/quorum/quorum_test.go')
| -rw-r--r-- | internal/quorum/quorum_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
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 |
