Skip to content

Commit 1878298

Browse files
committed
Refactor grpc test
Reworked to make use of the mock exported by the astarte message hub proto Signed-off-by: Luca Arato <luca.arato@secomind.com>
1 parent 05d400c commit 1878298

File tree

4 files changed

+644
-817
lines changed

4 files changed

+644
-817
lines changed

Cargo.lock

Lines changed: 44 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ uuid = { workspace = true, features = ["v4", "v5"] }
8080

8181
[dev-dependencies]
8282
astarte-device-sdk-derive = { workspace = true }
83+
astarte-message-hub-proto = { workspace = true, features = ["mock"] }
8384
async-trait = { workspace = true }
8485
color-eyre = { workspace = true }
8586
env_logger = { workspace = true }
@@ -107,7 +108,7 @@ rustc-args = ["--cfg=docsrs"]
107108
[workspace.dependencies]
108109
astarte-device-sdk = { path = "./", version = "=0.9.3" }
109110
astarte-device-sdk-derive = { version = "=0.9.3", path = "./astarte-device-sdk-derive" }
110-
astarte-message-hub-proto = { git = "https://github.com/astarte-platform/astarte-message-hub-proto.git", rev = "370be08ff90236a25b15af6e27d5363739566f2f" }
111+
astarte-message-hub-proto = { git = "https://github.com/lucaato/astarte-message-hub-proto.git", rev = "3f866059d2f788646ffe91973d01216bcf40d29a" }
111112
async-trait = "0.1.67"
112113
base64 = "0.22.0"
113114
bson = "2.7.0"

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ mod test {
108108
pub(crate) const E2E_DEVICE_DATASTREAM: &str = include_str!(
109109
"../e2e-test/interfaces/org.astarte-platform.rust.e2etest.DeviceDatastream.json"
110110
);
111+
pub(crate) const E2E_SERVER_DATASTREAM: &str = include_str!(
112+
"../e2e-test/interfaces/org.astarte-platform.rust.e2etest.ServerAggregate.json"
113+
);
111114
pub(crate) const E2E_DEVICE_AGGREGATE: &str = include_str!(
112115
"../e2e-test/interfaces/org.astarte-platform.rust.e2etest.DeviceAggregate.json"
113116
);

0 commit comments

Comments
 (0)