Add error checking

This commit is contained in:
Adrian Brink 2018-01-06 22:24:58 +01:00
parent ba475d3128
commit 13fa23c568
No known key found for this signature in database
GPG Key ID: 9168AC350E33CEF2
1 changed files with 4 additions and 3 deletions

View File

@ -37,14 +37,15 @@ func TestInquirerValidPath(t *testing.T) {
}
// initialize a certifier with the initial state
cert, _ := lite.NewInquiring(chainID, commits[0], trust, source)
cert, err := lite.NewInquiring(chainID, commits[0], trust, source)
require.Nil(err)
// this should fail validation....
commit := commits[count-1].Commit
err := cert.Certify(commit)
err = cert.Certify(commit)
require.NotNil(err)
// add a few seed in the middle should be insufficient
// adding a few commits in the middle should be insufficient
for i := 10; i < 13; i++ {
err := source.StoreCommit(commits[i])
require.Nil(err)