Fixup tests

This commit is contained in:
David Robertson 2023-07-27 12:10:46 +01:00
parent 210e95b0d8
commit 5d986294ba
No known key found for this signature in database
GPG Key ID: 903ECE108A39DEDD

View File

@ -67,9 +67,9 @@ func TestPendingTransactionIDs(t *testing.T) {
// Delia is tracking four devices. // Delia is tracking four devices.
allClear, err = pending.MissingTxnID("event4", "delia", "D1") allClear, err = pending.MissingTxnID("event4", "delia", "D1")
assertNoError(t, err) assertNoError(t, err)
assertAllClear(t, allClear, false) // waiting on E2, E3 and E4 assertAllClear(t, allClear, false) // waiting on D2, D3 and D4
// One of Delia's devices, say D2, sees a txn ID for E4. // One of Delia's devices, say D2, sees a txn ID for event 4.
err = pending.SeenTxnID("event4") err = pending.SeenTxnID("event4")
assertNoError(t, err) assertNoError(t, err)
@ -94,6 +94,7 @@ func TestPendingTransactionIDs(t *testing.T) {
} }
func assertAllClear(t *testing.T, got bool, want bool) { func assertAllClear(t *testing.T, got bool, want bool) {
t.Helper()
if got != want { if got != want {
t.Errorf("Expected allClear=%t, got %t", want, got) t.Errorf("Expected allClear=%t, got %t", want, got)
} }