diff options
author | Rina Fujino <18257209+rina23q@users.noreply.github.com> | 2022-05-09 13:30:36 +0200 |
---|---|---|
committer | Rina Fujino <18257209+rina23q@users.noreply.github.com> | 2022-05-09 13:30:36 +0200 |
commit | 63f1d471ab441fb711ce5a431648faf3f91a1814 (patch) | |
tree | 89ba518c897c2e5d8663781978f4d68adde63109 | |
parent | 73c38bc07f3e0cef2c230c0a47f73b9e36e70d72 (diff) |
Revert the pull request #1116
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
-rw-r--r-- | Cargo.lock | 196 | ||||
-rw-r--r-- | crates/common/download/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/common/logged_command/Cargo.toml | 5 | ||||
-rw-r--r-- | crates/common/tedge_config/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/common/tedge_utils/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/core/c8y_smartrest/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/core/c8y_translator/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/core/plugin_sm/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/core/tedge/Cargo.toml | 1 | ||||
-rw-r--r-- | crates/core/tedge_agent/Cargo.toml | 4 | ||||
-rw-r--r-- | crates/core/tedge_mapper/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/core/thin_edge_json/Cargo.toml | 1 | ||||
-rw-r--r-- | plugins/tedge_apt_plugin/Cargo.toml | 6 |
13 files changed, 218 insertions, 5 deletions
@@ -186,6 +186,27 @@ dependencies = [ ] [[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2 1.0.37", + "quote 1.0.18", + "syn 1.0.92", +] + +[[package]] name = "async-trait" version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -395,6 +416,7 @@ name = "c8y_smartrest" version = "0.6.3" dependencies = [ "agent_interface", + "anyhow", "assert-json-diff", "assert_matches", "csv", @@ -423,6 +445,7 @@ dependencies = [ "clock", "criterion", "json-writer", + "pretty_assertions", "proptest", "serde_json", "test-case", @@ -725,12 +748,18 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint", + "num-bigint 0.4.3", "num-traits", "rusticata-macros", ] [[package]] +name = "diff" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" + +[[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -824,10 +853,12 @@ dependencies = [ "reqwest", "serde", "serde_json", + "tedge_utils", "tempfile", "test-case", "thiserror", "tokio", + "tokio-test", "url", ] @@ -1114,6 +1145,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] +name = "hamcrest2" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f837c62de05dc9cc71ff6486cd85de8856a330395ae338a04bfcefe5e91075" +dependencies = [ + "num", + "regex", +] + +[[package]] name = "hashbrown" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1398,8 +1439,13 @@ name = "logged_command" version = "0.6.3" dependencies = [ "anyhow", + "assert_matches", + "async-trait", "log", + "serial_test 0.6.0", "tempfile", + "test-case", + "thiserror", "tokio", ] @@ -1570,7 +1616,7 @@ dependencies = [ "futures", "mqtt_tests", "rumqttc", - "serial_test", + "serial_test 0.5.1", "thiserror", "tokio", ] @@ -1664,6 +1710,31 @@ dependencies = [ ] [[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] name = "num-bigint" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1675,6 +1746,16 @@ dependencies = [ ] [[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] name = "num-integer" version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1685,6 +1766,29 @@ dependencies = [ ] [[package]] +name = "num-iter" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + +[[package]] name = "num-traits" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1755,6 +1859,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" [[package]] +name = "output_vt100" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" +dependencies = [ + "winapi", +] + +[[package]] name = "parking_lot" version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1883,13 +1996,14 @@ version = "0.6.3" dependencies = [ "agent_interface", "anyhow", + "assert_matches", "async-trait", "csv", "download", "logged_command", "serde", "serde_json", - "serial_test", + "serial_test 0.5.1", "tedge_utils", "tempfile", "test-case", @@ -1956,6 +2070,18 @@ dependencies = [ ] [[package]] +name = "pretty_assertions" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c038cb5319b9c704bf9c227c261d275bfec0ad438118a2787ce47944fb228b" +dependencies = [ + "ansi_term", + "ctor", + "diff", + "output_vt100", +] + +[[package]] name = "pretty_env_logger" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2375,6 +2501,12 @@ dependencies = [ ] [[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + +[[package]] name = "rusty-fork" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2531,7 +2663,18 @@ checksum = "e0bccbcf40c8938196944a3da0e133e031a33f4d6b72db3bda3cc556e361905d" dependencies = [ "lazy_static", "parking_lot 0.11.2", - "serial_test_derive", + "serial_test_derive 0.5.1", +] + +[[package]] +name = "serial_test" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5bcc41d18f7a1d50525d080fd3e953be87c4f9f1a974f3c21798ca00d54ec15" +dependencies = [ + "lazy_static", + "parking_lot 0.11.2", + "serial_test_derive 0.6.0", ] [[package]] @@ -2546,6 +2689,19 @@ dependencies = [ ] [[package]] +name = "serial_test_derive" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881bccd7d60fb32dfa3d7b3136385312f8ad75e2674aab2852867a09790cae8" +dependencies = [ + "proc-macro-error", + "proc-macro2 1.0.37", + "quote 1.0.18", + "rustversion", + "syn 1.0.92", +] + +[[package]] name = "sha-1" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2677,6 +2833,7 @@ dependencies = [ "base64", "certificate", "clap 3.1.15", + "futures", "hyper", "mockito", "pem", @@ -2711,6 +2868,7 @@ dependencies = [ "clap 3.1.15", "flockfile", "futures", + "mockall 0.10.2", "mqtt_channel", "mqtt_tests", "once_cell", @@ -2718,12 +2876,15 @@ dependencies = [ "predicates 2.1.1", "serde", "serde_json", + "serial_test 0.5.1", "tedge_config", + "tedge_users", "tedge_utils", "tempfile", "thiserror", "time", "tokio", + "tokio-test", "toml", "tracing", ] @@ -2743,9 +2904,15 @@ dependencies = [ name = "tedge_apt_plugin" version = "0.6.3" dependencies = [ + "anyhow", "clap 3.1.15", "csv", + "hamcrest2", + "reqwest", "serde", + "serial_test 0.5.1", + "tedge_utils", + "test-case", "thiserror", ] @@ -2756,6 +2923,7 @@ dependencies = [ "assert_matches", "certificate", "serde", + "tedge_users", "tedge_utils", "tempfile", "thiserror", @@ -2822,8 +2990,9 @@ dependencies = [ "reqwest", "serde", "serde_json", - "serial_test", + "serial_test 0.5.1", "tedge_config", + "tedge_users", "tedge_utils", "tempfile", "test-case", @@ -2831,6 +3000,7 @@ dependencies = [ "thiserror", "time", "tokio", + "tokio-test", "toml", "tracing", ] @@ -2847,7 +3017,9 @@ dependencies = [ name = "tedge_utils" version = "0.6.3" dependencies = [ + "anyhow", "assert_matches", + "futures", "nix", "tempfile", "thiserror", @@ -2944,6 +3116,7 @@ dependencies = [ "criterion", "json-writer", "mockall 0.10.2", + "proptest", "serde", "serde_json", "stats_alloc", @@ -3091,6 +3264,19 @@ dependencies = [ ] [[package]] +name = "tokio-test" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" +dependencies = [ + "async-stream", + "bytes", + "futures-core", + "tokio", + "tokio-stream", +] + +[[package]] name = "tokio-tungstenite" version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/crates/common/download/Cargo.toml b/crates/common/download/Cargo.toml index bf45228c..4d77ea5f 100644 --- a/crates/common/download/Cargo.toml +++ b/crates/common/download/Cargo.toml @@ -14,6 +14,7 @@ nix = "0.23" reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"] } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" +tedge_utils = { path = "../tedge_utils" } tempfile = "3.2" thiserror = "1.0" tokio = "1.12" @@ -25,3 +26,4 @@ mockito = "0.31" regex = "1.5" tempfile = "3.2" test-case = "2.0" +tokio-test = "0.4" diff --git a/crates/common/logged_command/Cargo.toml b/crates/common/logged_command/Cargo.toml index 8002ceea..ff18d5b1 100644 --- a/crates/common/logged_command/Cargo.toml +++ b/crates/common/logged_command/Cargo.toml @@ -6,10 +6,15 @@ edition = "2021" rust-version = "1.58.1" [dependencies] +async-trait = "0.1" log = "0.4" +thiserror = "1.0" tokio = { version = "1.8", features = [ "fs", "io-util", "macros", "process", "rt" ] } [dev-dependencies] anyhow = "1.0" +assert_matches = "1.5" +serial_test = "0.6" tempfile = "3.2" +test-case = "2.0" diff --git a/crates/common/tedge_config/Cargo.toml b/crates/common/tedge_config/Cargo.toml index 984ad91d..8c4813d3 100644 --- a/crates/common/tedge_config/Cargo.toml +++ b/crates/common/tedge_config/Cargo.toml @@ -9,6 +9,7 @@ rust-version = "1.58.1" certificate = { path = "../certificate" } serde = { version = "1.0", features = ["derive"] } tedge_utils = { path = "../tedge_utils" } +tedge_users = { path = "../tedge_users" } tempfile = "3.2" thiserror = "1.0" toml = "0.5" diff --git a/crates/common/tedge_utils/Cargo.toml b/crates/common/tedge_utils/Cargo.toml index 7a42e257..17e96060 100644 --- a/crates/common/tedge_utils/Cargo.toml +++ b/crates/common/tedge_utils/Cargo.toml @@ -13,6 +13,8 @@ default = [] logging = ["tracing", "tracing-subscriber"] [dependencies] +anyhow = "1.0" +futures = "0.3" nix = "0.23.1" tempfile = "3.2" thiserror = "1.0" diff --git a/crates/core/c8y_smartrest/Cargo.toml b/crates/core/c8y_smartrest/Cargo.toml index 8b21b359..3800152c 100644 --- a/crates/core/c8y_smartrest/Cargo.toml +++ b/crates/core/c8y_smartrest/Cargo.toml @@ -20,6 +20,7 @@ tokio = { version = "1.8", features = ["rt", "sync", "time"] } toml = "0.5" [dev-dependencies] +anyhow = "1.0" assert_matches = "1.5" assert-json-diff = "2.0" serde_json = "1.0" diff --git a/crates/core/c8y_translator/Cargo.toml b/crates/core/c8y_translator/Cargo.toml index f6fd28bf..61c693a7 100644 --- a/crates/core/c8y_translator/Cargo.toml +++ b/crates/core/c8y_translator/Cargo.toml @@ -17,6 +17,7 @@ anyhow = "1.0" assert_matches = "1.5" assert-json-diff = "2.0" criterion = "0.3" +pretty_assertions = "1.0" proptest = "1.0" serde_json = "1.0" test-case = "2.0" diff --git a/crates/core/plugin_sm/Cargo.toml b/crates/core/plugin_sm/Cargo.toml index ef844a24..3e6be8b3 100644 --- a/crates/core/plugin_sm/Cargo.toml +++ b/crates/core/plugin_sm/Cargo.toml @@ -22,6 +22,7 @@ url = "2.2" [dev-dependencies] anyhow = "1.0" +assert_matches = "1.5" serial_test = "0.5.1" tempfile = "3.2" test-case = "2.0" diff --git a/crates/core/tedge/Cargo.toml b/crates/core/tedge/Cargo.toml index bc01d456..91f70ac4 100644 --- a/crates/core/tedge/Cargo.toml +++ b/crates/core/tedge/Cargo.toml @@ -17,6 +17,7 @@ anyhow = "1.0" base64 = "0.13" certificate = { path = "../../common/certificate" } clap = { version = "3", features = ["cargo", "derive"] } +futures = "0.3" hyper = { version = "0.14", default-features = false } reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "rustls-tls", "stream"] } rpassword = "5.0" diff --git a/crates/core/tedge_agent/Cargo.toml b/crates/core/tedge_agent/Cargo.toml index 6fd0bc81..1e4ddc23 100644 --- a/crates/core/tedge_agent/Cargo.toml +++ b/crates/core/tedge_agent/Cargo.toml @@ -28,6 +28,7 @@ async-trait = "0.1" clap = { version = "3.0", features = ["cargo", "derive"] } flockfile = { path = "../../common/flockfile" } futures = "0.3" +mockall = "0.10" mqtt_channel = { path = "../../common/mqtt_channel" } plugin_sm = { path = "../plugin_sm" } serde = { version = "1.0", features = ["derive"] } @@ -47,5 +48,8 @@ assert-json-diff = "2.0" once_cell = "1.8" mqtt_tests = { path = "../../tests/mqtt_tests" } predicates = "2.1" +tedge_users = { path = "../../common/tedge_users"} tedge_utils = { path = "../../common/tedge_utils"} tempfile = "3.2" +tokio-test = "0.4" +serial_test = "0.5" diff --git a/crates/core/tedge_mapper/Cargo.toml b/crates/core/tedge_mapper/Cargo.toml index 34e8e8da..7a0cb3f1 100644 --- a/crates/core/tedge_mapper/Cargo.toml +++ b/crates/core/tedge_mapper/Cargo.toml @@ -46,6 +46,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" clap = { version = "3.0", features = ["cargo", "derive"] } tedge_config = { path = "../../common/tedge_config" } +tedge_users = { path = "../../common/tedge_users" } tedge_utils = { path = "../../common/tedge_utils", features = ["logging"] } thin_edge_json = { path = "../thin_edge_json" } thiserror = "1.0" @@ -65,6 +66,7 @@ serial_test = "0.5" tempfile = "3.2" test-case = "2.0" time = { version = "0.3", features = ["macros"] } +tokio-test = "0.4" [features] integration-test = [] diff --git a/crates/core/thin_edge_json/Cargo.toml b/crates/core/thin_edge_json/Cargo.toml index 44be4ea7..66ea41d0 100644 --- a/crates/core/thin_edge_json/Cargo.toml +++ b/crates/core/thin_edge_json/Cargo.toml @@ -20,6 +20,7 @@ anyhow = "1.0" clock = { path = "../../common/clock" } criterion = "0.3" mockall = "0.10" +proptest = "1.0" stats_alloc = "0.1" walkdir = "2" assert_matches = "1.5" diff --git a/plugins/tedge_apt_plugin/Cargo.toml b/plugins/tedge_apt_plugin/Cargo.toml index dd06abe6..4b732bd8 100644 --- a/plugins/tedge_apt_plugin/Cargo.toml +++ b/plugins/tedge_apt_plugin/Cargo.toml @@ -21,6 +21,12 @@ csv = "1.1" serde = { version = "1", features = ["derive"] } [dev-dependencies] +anyhow = "1.0" +hamcrest2 = "0.3" +reqwest = { version = "0.11", default-features = false, features = [ "blocking", "rustls-tls" ] } +serial_test = "0.5" +tedge_utils = { path = "../../crates/common/tedge_utils" } +test-case = "2.0" [features] requires-sudo = [] |