BaseServiceArchetype returns a new base service suitable for use in tests. Returns a new instance so that it's not possible to accidentally taint a shared object.
(tb testing.TB)
| 30 | // Returns a new instance so that it's not possible to accidentally taint a |
| 31 | // shared object. |
| 32 | func BaseServiceArchetype(tb testing.TB) *baseservice.Archetype { |
| 33 | tb.Helper() |
| 34 | |
| 35 | return &baseservice.Archetype{ |
| 36 | Logger: Logger(tb), |
| 37 | Time: &TimeStub{}, |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // A pool and sync.Once to initialize it, invoked by TestTx. Once open, this |
| 42 | // pool is never explicitly closed, instead closing implicitly as the package |
searching dependent graphs…