test nonsensical options
This commit is contained in:
parent
7303abae4b
commit
017e522caa
|
@ -900,6 +900,16 @@ func assertPeerList(t *testing.T, peers []peer.ID, expected ...peer.ID) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestNonsensicalSigningOptions(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
hosts := getNetHosts(t, ctx, 1)
|
||||
_, err := NewFloodSub(ctx, hosts[0], WithMessageSigning(false), WithStrictSignatureVerification(true))
|
||||
if err == nil {
|
||||
t.Error("expected constructor to fail on nonsensical options")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWithSigning(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
|
Loading…
Reference in New Issue