server: add functional tests

Make test coverage >= 90%

#1019 
can we make a separate test for canceling a proposal?