MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_migration_stats

Function test_migration_stats

atomic-core/tests/inode_graph_test.rs:370–396  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368
369#[test]
370fn test_migration_stats() {
371 let stats = MigrationStats::new();
372 assert_eq!(stats.inodes_processed, 0);
373 assert_eq!(stats.vertices_migrated, 0);
374 assert_eq!(stats.edges_added, 0);
375 assert_eq!(stats.errors, 0);
376
377 let mut stats1 = MigrationStats {
378 inodes_processed: 1,
379 vertices_migrated: 10,
380 edges_added: 20,
381 errors: 0,
382 };
383
384 let stats2 = MigrationStats {
385 inodes_processed: 2,
386 vertices_migrated: 15,
387 edges_added: 30,
388 errors: 1,
389 };
390
391 stats1.merge(&stats2);
392 assert_eq!(stats1.inodes_processed, 3);
393 assert_eq!(stats1.vertices_migrated, 25);
394 assert_eq!(stats1.edges_added, 50);
395 assert_eq!(stats1.errors, 1);
396}
397
398// Migration Config
399

Callers

nothing calls this directly

Calls 1

mergeMethod · 0.45

Tested by

no test coverage detected