Function
addTempFile
(wg *sync.WaitGroup, t *testing.T, tmpFolder string, fname string, content string)
Source from the content-addressed store, hash-verified
| 13 | ) |
| 14 | |
| 15 | func addTempFile(wg *sync.WaitGroup, t *testing.T, tmpFolder string, fname string, content string) { |
| 16 | if err := ioutil.WriteFile(tmpFolder+"/"+fname, []byte(content), 0644); err != nil { |
| 17 | t.Error(err) |
| 18 | } |
| 19 | wg.Add(1) |
| 20 | } |
| 21 | |
| 22 | // waitTimeout waits for the waitgroup for the specified max timeout. |
| 23 | // Returns true if waiting timed out. |
Tested by
no test coverage detected