(fqn string, size int)
| 1057 | } |
| 1058 | |
| 1059 | func createTestFile(fqn string, size int) { |
| 1060 | _ = os.Remove(fqn) |
| 1061 | testFile, err := cos.CreateFile(fqn) |
| 1062 | Expect(err).ShouldNot(HaveOccurred()) |
| 1063 | |
| 1064 | if size > 0 { |
| 1065 | buff := make([]byte, size) |
| 1066 | _, _ = rand.Read(buff) |
| 1067 | _, err := testFile.Write(buff) |
| 1068 | _ = testFile.Close() |
| 1069 | |
| 1070 | Expect(err).ShouldNot(HaveOccurred()) |
| 1071 | } |
| 1072 | } |
| 1073 | |
| 1074 | func getTestFileHash(fqn string) (hash string) { |
| 1075 | reader, _ := os.Open(fqn) |
no test coverage detected