katzenpost / mixnet_uprising

repository for tracking open tasks
18 stars 1 forks source link

use generative testing to test voting pki #78

Open david415 opened 6 years ago

david415 commented 6 years ago

our voting directory authority is rather complicated. we should really be using a quickcheck-like generative testing library. golang has such in it's standard library!

https://golang.org/pkg/testing/quick/

simple and powerful! we should use this for testing when appropriate.

david415 commented 6 years ago

https://github.com/katzenpost/authority/pull/48

david415 commented 6 years ago

generative tests are cool because we can use them to determine if a given property holds true for a huge input permutation space that manual testing cannot cover. here we see what it looks like to use the standard golang quick library for testing. here the property i use generative testing for is to make sure consensus is not achieved when there is not a threshold of well behaving mixes:

https://github.com/katzenpost/authority/blob/master/tests/voting_authority_test.go#L674-L710

but surely we can figure out some better tests for the voting pki.