add memory tests

This commit is contained in:
Chris Heppell
2020-12-30 10:57:17 +00:00
parent 8ecaf4cfd5
commit c3bc375ff1
2 changed files with 411 additions and 0 deletions

View File

@ -97,3 +97,10 @@ func copyErrors(errors []string) []string {
}
return copiedErrors
}
// Clear will empty all the results from the in memory store
func (ims *InMemoryStore) Clear() {
serviceResultsMutex.Lock()
serviceStatuses = make(map[string]*core.ServiceStatus)
serviceResultsMutex.Unlock()
}