[test]: Modify test_sst_build_all() to add checks for first_key and last_key of SST (#76)

Signed-off-by: Alex Chi <iskyzh@gmail.com>
Co-authored-by: shenjiaqi.2769 <shenjiaqi.2769@bytedance.com>
Co-authored-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Jiaqi Shen
2024-05-25 09:18:56 +08:00
committed by GitHub
parent daa4fde8d8
commit 2ba461b0ad

View File

@@ -55,7 +55,12 @@ fn generate_sst() -> (TempDir, SsTable) {
#[test]
fn test_sst_build_all() {
generate_sst();
let (_, sst) = generate_sst();
assert_eq!(sst.first_key().as_key_slice(), key_of(0).as_key_slice());
assert_eq!(
sst.last_key().as_key_slice(),
key_of(num_of_keys() - 1).as_key_slice()
)
}
#[test]