appendMockSource is only used to add mock source for tests.
(t *testing.T)
| 77 | |
| 78 | // appendMockSource is only used to add mock source for tests. |
| 79 | func appendMockSource(t *testing.T) { |
| 80 | t.Helper() |
| 81 | |
| 82 | restore := registry.RegisterTestFactory("mock", func() types.DataSource { return &MockSource{} }) |
| 83 | t.Cleanup(restore) |
| 84 | restore = registry.RegisterTestFactory("mock_cant_run", func() types.DataSource { return &MockSourceCantRun{} }) |
| 85 | t.Cleanup(restore) |
| 86 | } |
| 87 | |
| 88 | func TestDataSourceConfigure(t *testing.T) { |
| 89 | ctx := t.Context() |
no test coverage detected
searching dependent graphs…