Add tests for ValidateBasic methods#2754
Merged
melekes merged 1 commit intotendermint:developfrom Nov 9, 2018
Merged
Conversation
melekes
suggested changes
Nov 5, 2018
Contributor
melekes
left a comment
There was a problem hiding this comment.
🍓 🍍 🥛
Great work @katakonst! Thank you for contributing to Tendermint! We should probably rewrite TestEvidenceListMessageValidationBasic to not initialize reactors and there's also one small typo.
evidence/reactor_test.go
Outdated
| } | ||
| for _, tc := range testCases { | ||
| t.Run(tc.testName, func(t *testing.T) { | ||
| evList := sendEvidence(t, reactors[0].evpool, valAddr, NUM_EVIDENCE) |
Contributor
There was a problem hiding this comment.
why do we need to send it? can't we just validate it without running reactors and all that stuff?
Contributor
Author
There was a problem hiding this comment.
Don't need to run the reactors.
Deleted that part.
types/heartbeat_test.go
Outdated
| {"Missing signature", func(hb *Heartbeat) { | ||
| hb.Signature = nil | ||
| }, true}, | ||
| {"Signature to big", func(hb *Heartbeat) { |
Contributor
There was a problem hiding this comment.
to -> is too
Suggested change
| {"Signature to big", func(hb *Heartbeat) { | |
| {"Signature is too big", func(hb *Heartbeat) { |
b726a50 to
145f79d
Compare
Codecov Report
@@ Coverage Diff @@
## develop #2754 +/- ##
===========================================
- Coverage 62.37% 62.28% -0.09%
===========================================
Files 212 212
Lines 17210 17193 -17
===========================================
- Hits 10734 10708 -26
- Misses 5578 5587 +9
Partials 898 898
|
melekes
approved these changes
Nov 7, 2018
evidence/reactor_test.go
Outdated
| n := 3 | ||
| valAddr := []byte("myval") | ||
| evListMsg.Evidence = make([]types.Evidence, n) | ||
| for i := 0; i < 3; i++ { |
145f79d to
95badb0
Compare
maxim-levy
pushed a commit
to maxim-levy/tendermint
that referenced
this pull request
Nov 13, 2018
* 'master' of https://github.com/tendermint/tendermint: (330 commits) Release/v0.26.1 (tendermint#2803) fix amino overhead computation for Tx (tendermint#2792) p2p: re-check after sleeps (tendermint#2664) check the result of `ps.peer.Send` before calling `ps.setHasVote` (tendermint#2787) p2p: AddressBook requires addresses to have IDs; Do not close conn immediately after sending pex addrs in seed mode (tendermint#2797) test AutoFile#Size (happy path) [autofile/group] do not panic when checking size openFile creates a file if not exist => ErrNotExist is not possible use our logger in autofile/group Add tests for ValidateBasic methods (tendermint#2754) [docs] improve organization of ABCI docs & fix links (tendermint#2749) p2p: peer-id -> peer_id (tendermint#2771) mempool: print postCheck error (tendermint#2762) Fix crypto/merkle ProofOperators.Verify to check bounds on keypath pa… (tendermint#2756) Mempool WAL is still created by default in home directory, leads to permission errors (tendermint#2758) mempool: ErrPreCheck and more log info (tendermint#2724) Release/v0.26.0 (tendermint#2726) [ADR] [DRAFT] pubsub 2.0 (tendermint#2532) validate reactor messages (tendermint#2711) TMHASH is 32 bytes. Closes tendermint#1990 (tendermint#2732) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2740