diff --git a/src/units/rib_unit/tests.rs b/src/units/rib_unit/tests.rs index 49d9e52b..f03e669d 100644 --- a/src/units/rib_unit/tests.rs +++ b/src/units/rib_unit/tests.rs @@ -28,7 +28,7 @@ async fn process_non_route_update() { assert!(!is_filtered(&runner, update).await); // And it should NOT be added to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 0); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 0); } #[tokio::test] @@ -60,7 +60,7 @@ async fn process_update_single_route() { assert!(!is_filtered(&runner, update).await); // And it should be added to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 1); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1); } #[tokio::test] @@ -92,13 +92,13 @@ async fn process_update_same_route_twice() { assert!(!is_filtered(&runner, update.clone()).await); // And it should be added to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 1); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1); // When it is processed by this unit again it should not be filtered assert!(!is_filtered(&runner, update).await); // And it should NOT be added again to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 1); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1); } #[tokio::test] @@ -137,7 +137,7 @@ async fn process_update_two_routes_to_the_same_prefix() { } // Then only the one common prefix SHOULD be added to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 1); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 1); // And at that prefix there should be one RibValue containing two routes let match_options = MatchOptions { @@ -147,7 +147,7 @@ async fn process_update_two_routes_to_the_same_prefix() { include_more_specifics: true, }; eprintln!("Querying store match_prefix the first time"); - let match_result = runner.rib().as_ref().unwrap().match_prefix( + let match_result = runner.rib().store().unwrap().match_prefix( &raw_prefix, &match_options, &epoch::pin(), @@ -175,7 +175,7 @@ async fn process_update_two_routes_to_the_same_prefix() { // see that the routes HashSet Arc strong reference count increases from 2 to 3 while the inner items of the // HashSet still have a strong reference count of 1. eprintln!("Querying store match_prefix the second time"); - let match_result2 = runner.rib().as_ref().unwrap().match_prefix( + let match_result2 = runner.rib().store().unwrap().match_prefix( &raw_prefix, &match_options, &epoch::pin(), @@ -242,7 +242,7 @@ async fn process_update_two_routes_to_different_prefixes() { } // Then two separate prefixes SHOULD be added to the route store - assert_eq!(runner.rib().unwrap().prefixes_count(), 2); + assert_eq!(runner.rib().store().unwrap().prefixes_count(), 2); // And at that prefix there should be two RibValues let match_options = MatchOptions { @@ -256,7 +256,7 @@ async fn process_update_two_routes_to_different_prefixes() { let match_result = runner .rib() - .as_ref() + .store() .unwrap() .match_prefix(&prefix, &match_options, &epoch::pin()); assert!(matches!(match_result.match_type, MatchType::ExactMatch));