Skip to content

Commit

Permalink
add ut
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiyan committed Jan 20, 2025
1 parent 0285bd2 commit d5127ab
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions crates/core/src/metadata/meta_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,34 @@ mod tests {
}
Ok(())
}

#[test]
fn test_get_schema() {
assert_eq!(MetaField::schema().fields.len(), 5);
assert_eq!(
MetaField::schema().fields[0].name(),
MetaField::CommitTime.as_ref()
);
assert_eq!(
MetaField::schema().fields[1].name(),
MetaField::CommitSeqno.as_ref()
);
assert_eq!(
MetaField::schema().fields[2].name(),
MetaField::RecordKey.as_ref()
);
assert_eq!(
MetaField::schema().fields[3].name(),
MetaField::PartitionPath.as_ref()
);
assert_eq!(
MetaField::schema().fields[4].name(),
MetaField::FileName.as_ref()
);
assert_eq!(MetaField::schema_with_operation().fields.len(), 6);
assert_eq!(
MetaField::schema_with_operation().fields[5].name(),
MetaField::Operation.as_ref()
);
}
}

0 comments on commit d5127ab

Please sign in to comment.