Skip to content

Commit a8c406b

Browse files
committed
Testing device registration using random walk
Signed-off-by: Didier Wenzek <[email protected]>
1 parent 4f16ca8 commit a8c406b

File tree

5 files changed

+448
-0
lines changed

5 files changed

+448
-0
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/core/tedge_agent/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ assert-json-diff = { workspace = true }
5858
axum_tls = { workspace = true, features = ["test-helpers"] }
5959
bytes = { workspace = true }
6060
http-body = { workspace = true }
61+
proptest = { workspace = true }
6162
rcgen = { workspace = true }
6263
rustls-pemfile = { workspace = true }
6364
tedge_actors = { workspace = true, features = ["test-helpers"] }
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Seeds for failure cases proptest has generated in the past. It is
2+
# automatically read and these particular cases re-run before any
3+
# novel cases are generated.
4+
#
5+
# It is recommended to check this file in to source control so that
6+
# everyone who runs the test benefits from these saved cases.
7+
cc eb284ae3160cf4a071a3ca80175b2c72680b7c8ba19b8d577805ef1317eca2db # shrinks to registrations = [(MQTT, AddService { topic: "ac", props: [] }), (MQTT, AddService { topic: "ac", props: [] }), (MQTT, AddDevice { topic: "ac", props: [] }), (HTTP, AddService { topic: "ac", props: [("x", "4")] }), (HTTP, AddDevice { topic: "a", props: [] })]
8+
cc 6e3a5e19daf6c3a4732a0504822f2164c5d0f49ed5652e1e67c779a23aedbe77 # shrinks to registrations = [(HTTP, AddService { topic: "a", props: [] }), (MQTT, AddDevice { topic: "abc", props: [("z", "0")] }), (MQTT, AddDevice { topic: "abc", props: [("z", "8")] }), (HTTP, AddService { topic: "aa", props: [] }), (MQTT, AddDevice { topic: "abc", props: [("y", "3")] }), (MQTT, AddDevice { topic: "ab", props: [] }), (HTTP, AddService { topic: "a", props: [] }), (HTTP, AddDevice { topic: "abc", props: [("y", "7")] }), (MQTT, AddDevice { topic: "a", props: [] })]
9+
cc aa8e0b76fd3142bf3cd1df1f453a4468defd437111b406887d760f68d84ad5c3 # shrinks to registrations = tedge http delete /tedge/entity-store/v1/entities/device/a// && tedge http delete /tedge/entity-store/v1/entities/device/main/service/a && tedge mqtt pub -r device/main/service/a '{"@parent":"device/main//","@type":"service","z":"1"}' && tedge http delete /tedge/entity-store/v1/entities/device/main/service/a && tedge mqtt pub -r device/ab// '' && tedge mqtt pub -r device/a// '' && tedge http post /tedge/entity-store/v1/entities '{"@parent":"device/main//","@topic-id":"device/a//","@type":"child-device"}' && tedge http post /tedge/entity-store/v1/entities '{"@parent":"device/main//","@topic-id":"device/a//","@type":"child-device"}' && tedge mqtt pub -r device/a// '{"@parent":"device/main//","@type":"child-device","z":"4"}'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
pub(crate) mod server;
2+
3+
#[cfg(test)]
4+
mod tests;

0 commit comments

Comments
 (0)