diff options
author | Julien Kritter <julien.kritter@withings.com> | 2024-09-12 10:50:53 +0200 |
---|---|---|
committer | Julien Kritter <julien.kritter@withings.com> | 2024-09-12 10:50:53 +0200 |
commit | bd71728874e7f03c547246cb0076804f62db102f (patch) | |
tree | 5028687340c272ba522de8084167034e8f2eaad0 /src/db/test.rs | |
parent | 51ced6036602826ff653c6fc283cbf11fc7b4865 (diff) | |
download | garage-bd71728874e7f03c547246cb0076804f62db102f.tar.gz garage-bd71728874e7f03c547246cb0076804f62db102f.zip |
Tests: don't expect old value after transactional insert
Diffstat (limited to 'src/db/test.rs')
-rw-r--r-- | src/db/test.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/test.rs b/src/db/test.rs index e3b7badf..26b816b8 100644 --- a/src/db/test.rs +++ b/src/db/test.rs @@ -21,7 +21,7 @@ fn test_suite(db: Db) { let res = db.transaction::<_, (), _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), va); - assert_eq!(tx.insert(&tree, ka, vb).unwrap().unwrap(), va); + assert_eq!(tx.insert(&tree, ka, vb).unwrap(), ()); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); @@ -33,7 +33,7 @@ fn test_suite(db: Db) { let res = db.transaction::<(), _, _>(|tx| { assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vb); - assert_eq!(tx.insert(&tree, ka, vc).unwrap().unwrap(), vb); + assert_eq!(tx.insert(&tree, ka, vc).unwrap(), ()); assert_eq!(tx.get(&tree, ka).unwrap().unwrap(), vc); |