(tb testing.TB, filename string, lines []string)
| 141 | } |
| 142 | |
| 143 | func WriteFile(tb testing.TB, filename string, lines []string) { |
| 144 | file := filepath.Join("testdata", filename) |
| 145 | ofh, err := os.Create(file) |
| 146 | if err != nil { |
| 147 | fmt.Printf("%s cannot load json file %q: %s\n\n", caller(), file, err) |
| 148 | tb.FailNow() |
| 149 | } |
| 150 | for _, line := range lines { |
| 151 | ofh.WriteString(line + "\n") |
| 152 | } |
| 153 | ofh.Close() |
| 154 | } |
| 155 | |
| 156 | func LoadQueriesFromFile(tb testing.TB, filename string) { |
| 157 | conn := GetMySQLConnection(tb) |
no test coverage detected