(t *testing.T, file, got string)
| 12 | ) |
| 13 | |
| 14 | func expectFileContent(t *testing.T, file, got string) { |
| 15 | data, err := os.ReadFile(file) |
| 16 | // Ignore windows line endings |
| 17 | data = bytes.ReplaceAll(data, []byte("\r\n"), []byte("\n")) |
| 18 | |
| 19 | r := require.New(t) |
| 20 | r.NoError(err) |
| 21 | r.Equal(got, string(data)) |
| 22 | } |
| 23 | |
| 24 | func buildTestContext(t *testing.T) context.Context { |
| 25 | ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) |
no outgoing calls
no test coverage detected