diff --git a/crates/horizon-client/src/save.rs b/crates/horizon-client/src/save.rs index 673752bcb..880729f8c 100644 --- a/crates/horizon-client/src/save.rs +++ b/crates/horizon-client/src/save.rs @@ -2242,10 +2242,12 @@ mod tests { super::read_dat(&dir.join("level.dat")) .and_then(|r| super::number(r.get("Data")?.get("DataVersion"))) }; - // 1.16.5, older than the ported fixes: refused, left as it is. - super::write_dat(&dir.join("level.dat"), level(2586)).unwrap(); - assert!(super::upgrade_older_world(&dir).is_err()); - assert_eq!(version(&dir), Some(2586)); + // 1.12.2 and 1.16.5: upgraded too, every server fix is ported. + for old in [1343, 2586] { + super::write_dat(&dir.join("level.dat"), level(old)).unwrap(); + super::upgrade_older_world(&dir).unwrap(); + assert_eq!(version(&dir), Some(i64::from(super::DATA_VERSION))); + } // 1.21.1: upgraded to the current version. super::write_dat(&dir.join("level.dat"), level(3955)).unwrap(); super::upgrade_older_world(&dir).unwrap();