aboutsummaryrefslogtreecommitdiff
path: root/trillian_test.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-24 20:48:17 +0100
committerRasmus Dahlberg <rasmus.dahlberg@kau.se>2020-11-24 20:48:17 +0100
commitba10dd571e0b4f7fc1febe5ce24299e571eeb9e7 (patch)
tree7ac742fbc5091dde684a11184125652e8aaacb57 /trillian_test.go
parent13df779257e726c5e89843a36c55397ae4ae9105 (diff)
fixed minor comments
Diffstat (limited to 'trillian_test.go')
-rw-r--r--trillian_test.go9
1 files changed, 3 insertions, 6 deletions
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,
},
{