useTestSchemas points ghmock at the small schemas in testdata.
(t *testing.T)
| 61 | |
| 62 | // useTestSchemas points ghmock at the small schemas in testdata. |
| 63 | func useTestSchemas(t *testing.T) { |
| 64 | t.Helper() |
| 65 | for env, file := range map[string]string{ |
| 66 | graphQLSource.envVar: "schema.graphql", |
| 67 | restSource.envVar: "rest.json", |
| 68 | } { |
| 69 | p, err := filepath.Abs(filepath.Join("testdata", file)) |
| 70 | require.NoError(t, err) |
| 71 | t.Setenv(env, p) |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // testChecker returns a checker that uses the schemas in testdata. |
| 76 | func testChecker(t *testing.T) *checker { |
no test coverage detected