chore: minor refactor of the prometheus module

This commit is contained in:
Julien Neuhart
2023-11-19 14:43:19 +01:00
parent 32491ae2ad
commit 5c56317d50
7 changed files with 194 additions and 180 deletions

View File

@@ -162,3 +162,16 @@ func TestLoggerProviderMock(t *testing.T) {
t.Errorf("expected no error from LoggerProviderMock.Logger, but got: %v", err)
}
}
func TestMetricsProviderMock(t *testing.T) {
mock := &MetricsProviderMock{
MetricsMock: func() ([]Metric, error) {
return nil, nil
},
}
_, err := mock.Metrics()
if err != nil {
t.Errorf("expected no error from MetricsProviderMock.Metrics, but got: %v", err)
}
}