First end-to-end role tests

This commit is contained in:
Ethan Frey
2017-07-12 17:24:12 +02:00
parent 9ea34e9c8f
commit 33c9aa96f3
4 changed files with 114 additions and 1 deletions
+3 -1
View File
@@ -174,9 +174,11 @@ func (p PanicHandler) DeliverTx(ctx basecoin.Context, store state.KVStore, tx ba
// CheckHandler accepts CheckTx and verifies the permissions
type CheckHandler struct {
PassOption
basecoin.NopOption
}
var _ basecoin.Handler = CheckHandler{}
// Name - return handler's name
func (CheckHandler) Name() string {
return NameCheck
+1
View File
@@ -77,6 +77,7 @@ func TestCheck(t *testing.T) {
valid bool
signers, required []basecoin.Actor
}{
{true, nil, nil},
{true, []basecoin.Actor{a}, []basecoin.Actor{a}},
{true, []basecoin.Actor{a, b}, []basecoin.Actor{a}},
{false, []basecoin.Actor{a}, []basecoin.Actor{a, b}},