MCPcopy
hub / github.com/etcd-io/bbolt / backupDB

Function backupDB

concurrent_test.go:559–565  ·  view source on GitHub ↗
(t *testing.T, srcPath string, dstPath string)

Source from the content-addressed store, hash-verified

557}
558
559func 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
567func copyFile(srcPath, dstPath string) error {
568 // Ensure source file exists.

Callers 1

saveDataIfFailedFunction · 0.85

Calls 1

copyFileFunction · 0.85

Tested by

no test coverage detected