feat: characterized the existing use cases as a baseline; every repo fake behaves like the real ones and can be told to fail, every use case is covered; gremlins runs clean on useCases

This commit is contained in:
fsylvain committed 2026-09-23 18:21:46 +02:00
1 parent 09bd5afa4a
commit 7c57173497
12 files changed
+1245 -92

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package test
import "errors"
var errRepositoryFailure = errors.New("repository failure")
type failSwitch struct {
method string
}
func (f *failSwitch) failNext(method string) {
f.method = method
}
func (f *failSwitch) trigger(method string) error {
if f.method == method {
f.method = ""
return errRepositoryFailure
}
return nil
}