MockMetricStore isn't doing any of the validation and sanitation a real metric store implementation has to do. Those are tested in the storage package. Here we only ensure that the right method calls are performed by the code in the handlers.
| 42 | // package. Here we only ensure that the right method calls are performed |
| 43 | // by the code in the handlers. |
| 44 | type MockMetricStore struct { |
| 45 | lastWriteRequest storage.WriteRequest |
| 46 | metricGroups storage.GroupingKeyToMetricGroup |
| 47 | writeRequests []storage.WriteRequest |
| 48 | err error // If non-nil, will be sent to Done channel in request. |
| 49 | } |
| 50 | |
| 51 | func (m *MockMetricStore) SubmitWriteRequest(req storage.WriteRequest) { |
| 52 | m.writeRequests = append(m.writeRequests, req) |
nothing calls this directly
no outgoing calls
no test coverage detected