(t *testing.T, srcPath string, dstPath string)
| 557 | } |
| 558 | |
| 559 | func backupDB(t *testing.T, srcPath string, dstPath string) { |
| 560 | targetFile := filepath.Join(dstPath, "db.bak") |
| 561 | t.Logf("Saving the DB file to %s", targetFile) |
| 562 | err := copyFile(srcPath, targetFile) |
| 563 | require.NoError(t, err) |
| 564 | t.Logf("DB file saved to %s", targetFile) |
| 565 | } |
| 566 | |
| 567 | func copyFile(srcPath, dstPath string) error { |
| 568 | // Ensure source file exists. |
no test coverage detected