From ba10dd571e0b4f7fc1febe5ce24299e571eeb9e7 Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 24 Nov 2020 20:48:17 +0100 Subject: fixed minor comments --- trillian_test.go | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'trillian_test.go') diff --git a/trillian_test.go b/trillian_test.go index bbbfff3..c7bdcf1 100644 --- a/trillian_test.go +++ b/trillian_test.go @@ -173,7 +173,7 @@ func TestCheckGetInclusionProofByHash(t *testing.T) { }, { description: "bad response: proof with invalid node hash", - rsp: makeTrillianGetInclusionProofByHashResponse(t, int64(testIndex), [][]byte{make([]byte, 31)}), + rsp: makeTrillianGetInclusionProofByHashResponse(t, int64(testIndex), [][]byte{make([]byte, testHashLen-1)}), wantErr: true, }, { @@ -187,9 +187,6 @@ func TestCheckGetInclusionProofByHash(t *testing.T) { } } -// TODO: fix hardcoded assumed test hash value len of 32? - -// TODO: TestGetConsistencyProof func TestCheckGetConsistencyProof(t *testing.T) { lp := makeTestLogParameters(t, nil) for _, table := range []struct { @@ -214,7 +211,7 @@ func TestCheckGetConsistencyProof(t *testing.T) { }, { description: "bad response: proof with invalid node hash", - rsp: makeTrillianGetConsistencyProofResponse(t, [][]byte{make([]byte, 31)}), + rsp: makeTrillianGetConsistencyProofResponse(t, [][]byte{make([]byte, testHashLen-1)}), wantErr: true, }, { @@ -270,7 +267,7 @@ func TestCheckGetLatestSignedLogRoot(t *testing.T) { }, { description: "bad trillian response: invalid root hash size", - rsp: makeLatestSignedLogRootResponse(t, 0, 0, make([]byte, 31)), + rsp: makeLatestSignedLogRootResponse(t, 0, 0, make([]byte, testHashLen-1)), wantErr: true, }, { -- cgit v1.2.3