server: add functional tests

Make test coverage >= 90%

#1019 
shouldn't this be []action?