Skip to content

Commit c2bde9f

Browse files
committed
Expose MockMicrogridApiClient and MockComponent
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
1 parent 31fdaa3 commit c2bde9f

4 files changed

Lines changed: 3 additions & 4 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ tonic = "0.14"
2323
tonic-prost = "0.14"
2424
tracing = { version = "0.1" }
2525
tracing-subscriber = { version = "0.3" }
26+
tokio-stream = { version = "0.1.17", features = ["sync"] }
2627

2728
[dev-dependencies]
2829
tracing-subscriber = { version = "0.3", features = ["std", "env-filter"] }
2930
tokio = { version = "1.48", features = ["test-util"] }
30-
tokio-stream = { version = "0.1.17", features = ["sync"] }
3131

3232

3333
[build-dependencies]

src/client.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ pub use proto::common::microgrid::electrical_components::{
1818
ElectricalComponent, ElectricalComponentCategory,
1919
};
2020

21-
#[cfg(test)]
22-
pub(crate) mod test_utils;
21+
pub mod test_utils;

src/client/proto.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ mod pb {
1717
// Only export what we need
1818
pub use pb::frequenz::api::common::v1alpha8 as common;
1919
pub use pb::frequenz::api::microgrid::v1alpha18 as microgrid;
20-
#[cfg(test)]
2120
pub use pb::google;
2221

2322
mod electrical_component;

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub use bounds::Bounds;
88

99
pub mod client;
1010
pub use client::MicrogridClientHandle;
11+
pub use client::test_utils::{MockComponent, MockMicrogridApiClient};
1112
pub(crate) use client::proto;
1213

1314
mod error;

0 commit comments

Comments
 (0)