MCPcopy Create free account
hub / github.com/Percona-Lab/mysql_random_data_load / WriteFile

Function WriteFile

testutils/testutils.go:143–154  ·  view source on GitHub ↗
(tb testing.TB, filename string, lines []string)

Source from the content-addressed store, hash-verified

141}
142
143func 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
156func LoadQueriesFromFile(tb testing.TB, filename string) {
157 conn := GetMySQLConnection(tb)

Callers 1

UpdateSampleFileFunction · 0.85

Calls 1

callerFunction · 0.85

Tested by

no test coverage detected