Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
max-dfinity committed Jan 2, 2025
1 parent d83bb4a commit 43ab687
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions rs/registry/canister/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,10 @@ impl Registry {
version_timestamps: self
.version_timestamps
.iter()
.map(|(k, v)| (*k, *v))
.map(|(k, v)| VersionTimestamp {
version: *v,
timestamp_nanoseconds: *k,
})
.collect(),
},
ReprVersion::Unspecified => panic!("Unspecified version is not supported."),
Expand Down Expand Up @@ -1074,11 +1077,6 @@ mod tests {
assert_eq!(deserialized, registry);
}

#[test]
fn test_from_serializable_form_version_unspecified_max_size_delta() {
test_from_serializable_form_impl(0, ReprVersion::Unspecified)
}

#[test]
fn test_from_serializable_form_version1_max_size_delta() {
test_from_serializable_form_impl(0, ReprVersion::Version1)
Expand All @@ -1087,7 +1085,7 @@ mod tests {
#[test]
#[should_panic(expected = "[Registry] Transaction rejected because delta would be too large")]
fn test_from_serializable_form_version_unspecified_delta_too_large() {
test_from_serializable_form_impl(1, ReprVersion::Unspecified)
test_from_serializable_form_impl(1, ReprVersion::Version1)
}

#[test]
Expand Down

0 comments on commit 43ab687

Please sign in to comment.