File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,12 +23,15 @@ tonic = "0.14"
2323tonic-prost = " 0.14"
2424tracing = { version = " 0.1" }
2525tracing-subscriber = { version = " 0.3" }
26+ tokio-stream = { version = " 0.1.17" , features = [" sync" ], optional = true }
2627
2728[dev-dependencies ]
2829tracing-subscriber = { version = " 0.3" , features = [" std" , " env-filter" ] }
2930tokio = { version = " 1.48" , features = [" test-util" ] }
3031tokio-stream = { version = " 0.1.17" , features = [" sync" ] }
3132
32-
3333[build-dependencies ]
3434tonic-prost-build = { version = " 0.14" , features = [" cleanup-markdown" ] }
35+
36+ [features ]
37+ test-utils = [" dep:tokio-stream" ]
Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ pub use proto::common::microgrid::electrical_components::{
1818 ElectricalComponent , ElectricalComponentCategory ,
1919} ;
2020
21- #[ cfg( test) ]
22- pub ( crate ) mod test_utils;
21+ #[ cfg( any( test, feature = "test-utils" ) ) ]
22+ #[ expect( clippy:: unwrap_used, clippy:: panic, clippy:: expect_used) ]
23+ pub mod test_utils;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ mod pb {
1717// Only export what we need
1818pub use pb:: frequenz:: api:: common:: v1alpha8 as common;
1919pub use pb:: frequenz:: api:: microgrid:: v1alpha18 as microgrid;
20- #[ cfg( test) ]
20+ #[ cfg( any ( test, feature = "test-utils" ) ) ]
2121pub use pb:: google;
2222
2323mod electrical_component;
Original file line number Diff line number Diff line change @@ -38,3 +38,6 @@ pub(crate) mod wall_clock_timer;
3838
3939mod microgrid;
4040pub use microgrid:: { BatteryPool , Microgrid } ;
41+
42+ #[ cfg( any( test, feature = "test-utils" ) ) ]
43+ pub use client:: test_utils;
You can’t perform that action at this time.
0 commit comments