Browse Source

Add error checking

pull/1063/head
Adrian Brink 7 years ago
parent
commit
13fa23c568
No known key found for this signature in database GPG Key ID: 9168AC350E33CEF2
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      lite/inquirer_test.go

+ 4
- 3
lite/inquirer_test.go View File

@ -37,14 +37,15 @@ func TestInquirerValidPath(t *testing.T) {
} }
// initialize a certifier with the initial state // 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.... // this should fail validation....
commit := commits[count-1].Commit commit := commits[count-1].Commit
err := cert.Certify(commit)
err = cert.Certify(commit)
require.NotNil(err) 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++ { for i := 10; i < 13; i++ {
err := source.StoreCommit(commits[i]) err := source.StoreCommit(commits[i])
require.Nil(err) require.Nil(err)


Loading…
Cancel
Save