MCPcopy
hub / github.com/keploy/keploy / mockMemDb

Struct mockMemDb

pkg/agent/proxy/integrations/http/match_test.go:26–34  ·  view source on GitHub ↗

mockMemDb is a minimal mock of the MockMemDb interface for testing. updateUnFilteredMockOld / updateUnFilteredMockNew capture the most recent (old, new) pair handed to UpdateUnFilteredMock so tests can assert on the arguments. updateUnFilteredReturn is the value returned to the caller. deletedFilter

Source from the content-addressed store, hash-verified

24// deletedFiltered captures the argument to DeleteFilteredMock; its
25// return value is driven by deleteFilteredReturn.
26type mockMemDb struct {
27 mocks []*models.Mock
28 err error
29 updateUnFilteredMockOld *models.Mock
30 updateUnFilteredMockNew *models.Mock
31 updateUnFilteredReturn bool
32 deletedFiltered *models.Mock
33 deleteFilteredReturn bool
34}
35
36func (m *mockMemDb) GetUnFilteredMocks() ([]*models.Mock, error) { return m.mocks, m.err }
37func (m *mockMemDb) GetFilteredMocks() ([]*models.Mock, error) { return nil, nil }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected