Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
loki/pkg/util/mock.go

22 lines
326 B

package util
import (
"github.com/stretchr/testify/mock"
)
type ExtendedMock struct {
mock.Mock
}
func (m *ExtendedMock) GetMockedCallsByMethod(method string) []mock.Call {
calls := make([]mock.Call, 0)
for _, call := range m.Calls {
if call.Method == method {
calls = append(calls, call)
}
}
return calls
}