Skip to content

Commit

Permalink
test: checkpoint struct fields gets serialized to camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
feniljain authored and ion-elgreco committed Sep 20, 2024
1 parent 964eb4e commit 55a19f6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crates/core/src/table/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,4 +627,21 @@ mod tests {
.unwrap();
(dt, tmp_dir)
}

#[test]
fn checkpoint_should_serialize_in_camel_case() {
let checkpoint = CheckPoint {
version: 1,
size: 1,
parts: None,
size_in_bytes: Some(1),
num_of_add_files: Some(1),
};

let checkpoint_json_serialized =
serde_json::to_string(&checkpoint).expect("could not serialize to json");

assert!(checkpoint_json_serialized.contains("sizeInBytes"));
assert!(checkpoint_json_serialized.contains("numOfAddFiles"));
}
}

0 comments on commit 55a19f6

Please sign in to comment.