server: add functional tests

Make test coverage >= 90%

#1019 
This test focuses on do proposal in single machine, and ensures that `Do` does the right thing.

The PR focuses on functional testing, and i will clean up testCluster in the next part.