Skip to content

Commit

Permalink
add sanity check for current version
Browse files Browse the repository at this point in the history
  • Loading branch information
kariy committed Apr 15, 2024
1 parent bbf085f commit 0dd1a14
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/katana/storage/db/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@ pub(super) fn get_db_version(path: impl AsRef<Path>) -> Result<u32, DatabaseVers
pub(super) fn default_version_file_path(path: &Path) -> PathBuf {
path.join(DB_VERSION_FILE_NAME)
}

#[cfg(test)]
mod tests {

#[test]
fn test_current_version() {
use super::CURRENT_DB_VERSION;
assert_eq!(CURRENT_DB_VERSION, 1, "Invalid current database version")
}
}

0 comments on commit 0dd1a14

Please sign in to comment.