server: add unit tests

Make test coverage >= 90%

#1019 
`TestDoProposalCancelled` sounds like the name of the same series as `TestDoProposal`.
And I take https://github.com/coreos/etcd/blob/master/etcdserver/etcdhttp/http_test.go#L329 as my reference.
maybe `TestDoCancelledContext` instead?

I will simplify the function.