existsWithContent checks that the given file exists and has the correct content.
(path string, content []byte, t testing.TB)
| 719 | |
| 720 | // existsWithContent checks that the given file exists and has the correct content. |
| 721 | func existsWithContent(path string, content []byte, t testing.TB) { |
| 722 | info, err := os.Stat(path) |
| 723 | isNilUp(err, t, 1) |
| 724 | equalsUp(int64(len(content)), info.Size(), t, 1) |
| 725 | |
| 726 | b, err := ioutil.ReadFile(path) |
| 727 | isNilUp(err, t, 1) |
| 728 | equalsUp(content, b, t, 1) |
| 729 | } |
| 730 | |
| 731 | // logFile returns the log file name in the given directory for the current fake |
| 732 | // time. |
no test coverage detected
searching dependent graphs…