(t *testing.T)
| 101 | } |
| 102 | |
| 103 | func TestCopyFile_LargeFile(t *testing.T) { |
| 104 | tmpDir, cleanup, _ := testutil.TempDir("surge-copy-test") |
| 105 | defer cleanup() |
| 106 | |
| 107 | size := int64(5 * types.MB) |
| 108 | srcPath, _ := testutil.CreateTestFile(tmpDir, "large.bin", size, false) |
| 109 | dstPath := filepath.Join(tmpDir, "large_copy.bin") |
| 110 | |
| 111 | err := utils.CopyFile(srcPath, dstPath) |
| 112 | if err != nil { |
| 113 | t.Fatalf("copyFile failed for large file: %v", err) |
| 114 | } |
| 115 | |
| 116 | if err := testutil.VerifyFileSize(dstPath, size); err != nil { |
| 117 | t.Error(err) |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | func TestCopyFile_ContentVerification(t *testing.T) { |
| 122 | tmpDir, cleanup, _ := testutil.TempDir("surge-copy-content") |
nothing calls this directly
no test coverage detected