Tolerate that there may not be any lables, if the teststat.FillCounter() did not add any samples.
Eric Feliksik
6 years ago
40 | 40 | |
41 | 41 | func (mcw *mockCloudWatch) testDimensions(name string, labelValues ...string) error { |
42 | 42 | mcw.mtx.RLock() |
43 | _, hasValue := mcw.valuesReceived[name] | |
44 | if !hasValue { | |
45 | return nil // nothing to check; 0 samples were received | |
46 | } | |
43 | 47 | dimensions, ok := mcw.dimensionsReceived[name] |
44 | 48 | mcw.mtx.RUnlock() |
45 | 49 |