Skip to content

Commit

Permalink
Add an option for ut with a value of None.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuakeWang committed Aug 5, 2024
1 parent 0df7b02 commit 2c78c21
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/paimon/src/spec/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,21 @@ mod tests {
}

#[test]
fn test_snapshot_default_values() {
fn test_snapshot_with_none_fields() {
let snapshot = Snapshot::builder()
.version(3)
.id(1003)
.schema_id(2004)
.base_manifest_list("base_manifest_list_v3".to_string())
.delta_manifest_list("delta_manifest_list_v3".to_string())
.changelog_manifest_list(None)
.index_manifest(None)
.commit_user("user3".to_string())
.total_record_count(None)
.delta_record_count(None)
.changelog_record_count(None)
.watermark(None)
.statistics(None)
.build();

assert_eq!(snapshot.version(), 3);
Expand Down

0 comments on commit 2c78c21

Please sign in to comment.