Browse Source

review fixes

pull/3370/head
Juan Leni 6 years ago
parent
commit
dc1d24afb1
No known key found for this signature in database GPG Key ID: 23F1452155140419
1 changed files with 14 additions and 16 deletions
  1. +14
    -16
      privval/signer_client_test.go

+ 14
- 16
privval/signer_client_test.go View File

@ -44,13 +44,11 @@ func getSignerTestCases(t *testing.T) []signerTestCase {
func TestSignerClose(t *testing.T) {
for _, tc := range getSignerTestCases(t) {
func() {
err := tc.signer.Close()
assert.NoError(t, err)
err := tc.signer.Close()
assert.NoError(t, err)
err = tc.signerService.Stop()
assert.NoError(t, err)
}()
err = tc.signerService.Stop()
assert.NoError(t, err)
}
}
@ -171,16 +169,16 @@ func TestSignerSignProposalErrors(t *testing.T) {
defer tc.signerService.OnStop()
defer tc.signer.Close()
//ts := time.Now()
//proposal := &types.Proposal{Timestamp: ts}
//err := tc.signer.SignProposal(tc.chainID, proposal)
//require.Equal(t, err.(*RemoteSignerError).Description, types.ErroringMockPVErr.Error())
//
//err = tc.mockPV.SignProposal(tc.chainID, proposal)
//require.Error(t, err)
//
//err = tc.signer.SignProposal(tc.chainID, proposal)
//require.Error(t, err)
ts := time.Now()
proposal := &types.Proposal{Timestamp: ts}
err := tc.signer.SignProposal(tc.chainID, proposal)
require.Equal(t, err.(*RemoteSignerError).Description, types.ErroringMockPVErr.Error())
err = tc.mockPV.SignProposal(tc.chainID, proposal)
require.Error(t, err)
err = tc.signer.SignProposal(tc.chainID, proposal)
require.Error(t, err)
}()
}
}


Loading…
Cancel
Save