server: add functional tests

Make test coverage >= 90%

#1019 
i was think we only need to implement `get`, `set` for testing purpose. 
```go
func (s *storeRecord) CAS(_, _, string, _ time.Time) (*store.Event, error) {return nil,nil}
```