aboutsummaryrefslogtreecommitdiff
path: root/tests/dedo.go
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-01-24 10:14:42 -0300
committerEuAndreh <eu@euandre.org>2025-01-24 10:14:42 -0300
commit7c57899812df8c2d11119e9944de35fb00a73ce9 (patch)
tree16553b357c9dbadd9f9c4cfacc58726792dbc39d /tests/dedo.go
parentsrc/dedo.go: Simplify initDB() (diff)
downloaddedo-7c57899812df8c2d11119e9944de35fb00a73ce9.tar.gz
dedo-7c57899812df8c2d11119e9944de35fb00a73ce9.tar.xz
src/dedo.go: Remove deprecated Tx.Copy() method
Diffstat (limited to 'tests/dedo.go')
-rw-r--r--tests/dedo.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/dedo.go b/tests/dedo.go
index 1ab2b61..4cfde1e 100644
--- a/tests/dedo.go
+++ b/tests/dedo.go
@@ -5793,7 +5793,8 @@ func TestTx_CopyFile_Error_Meta(t *testing.T) {
}
if err := db.View(func(tx *Tx) error {
- return tx.Copy(&failWriter{})
+ _, err := tx.WriteTo(&failWriter{})
+ return err
}); err == nil || err.Error() != "meta 0 copy: error injected for tests" {
t.Fatalf("unexpected error: %v", err)
}
@@ -5822,7 +5823,8 @@ func TestTx_CopyFile_Error_Normal(t *testing.T) {
}
if err := db.View(func(tx *Tx) error {
- return tx.Copy(&failWriter{3 * db.pageSize})
+ _, err := tx.WriteTo(&failWriter{3 * db.pageSize})
+ return err
}); err == nil || err.Error() != "error injected for tests" {
t.Fatalf("unexpected error: %v", err)
}