summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--mqtt/mqtt_client/Cargo.toml18
-rw-r--r--mqtt/mqtt_client/examples/temperature_publisher.rs2
-rw-r--r--tedge-mapper/Cargo.toml4
-rw-r--r--tedge/Cargo.toml10
-rw-r--r--tests/testlib/Cargo.toml9
-rw-r--r--tests/testlib/src/lib.rs30
-rw-r--r--translator/c8y_json_translator/Cargo.toml2
8 files changed, 18 insertions, 58 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 67486ff1..cbffb168 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -4,7 +4,6 @@ members = [
"mqtt/mqtt_client",
"tedge",
"tedge-mapper",
- "tests/testlib",
"translator/c8y_json_translator",
]
diff --git a/mqtt/mqtt_client/Cargo.toml b/mqtt/mqtt_client/Cargo.toml
index ddf8f5fb..5d2899d9 100644
--- a/mqtt/mqtt_client/Cargo.toml
+++ b/mqtt/mqtt_client/Cargo.toml
@@ -6,17 +6,17 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
-tokio = { version = "1.0", features = ["sync"] }
+futures = "0.3.12"
rumqttc = { git = "https://github.com/mneumann/rumqtt", branch = "support-publish-ack" }
-thiserror = "1.0"
-futures = "0.3"
+thiserror = "1.0.23"
+tokio = { version = "1.1.0", features = ["sync"] }
[dev-dependencies]
-log = "0.4.11"
-futures = "0.3"
-futures-timer = "3.0"
-tokio-test = "0.4"
-env_logger = "0.8.2"
async-log = "2.0.0"
-rand = "0.7.3"
+env_logger = "0.8.2"
+futures = "0.3.12"
+futures-timer = "3.0.2"
json = "0.12.4"
+log = "0.4.14"
+rand = "0.8.3"
+tokio-test = "0.4.0"
diff --git a/mqtt/mqtt_client/examples/temperature_publisher.rs b/mqtt/mqtt_client/examples/temperature_publisher.rs
index 253ccb97..49b304e3 100644
--- a/mqtt/mqtt_client/examples/temperature_publisher.rs
+++ b/mqtt/mqtt_client/examples/temperature_publisher.rs
@@ -60,7 +60,7 @@ async fn publish_temperature(mqtt: Client, c8y_msg: Topic) -> Result<(), mqtt_cl
fn random_in_range(low: i32, high: i32) -> i32 {
let mut rng = thread_rng();
- rng.gen_range(low, high)
+ rng.gen_range(low..high)
}
async fn listen_command(mut messages: MessageStream) {
diff --git a/tedge-mapper/Cargo.toml b/tedge-mapper/Cargo.toml
index 3d6240b0..b8a43745 100644
--- a/tedge-mapper/Cargo.toml
+++ b/tedge-mapper/Cargo.toml
@@ -7,7 +7,7 @@ edition = "2018"
chrono = "0.4.19"
c8y_json_translator = {version = "0.1.0", path = "../translator/c8y_json_translator"}
env_logger = "0.8.2"
-log = "0.4.11"
+log = "0.4.14"
mqtt_client = {version = "0.1.0", path = "../mqtt/mqtt_client"}
-tokio = { version = "1.0.1", features = ["full"] }
+tokio = { version = "1.1.0", features = ["full"] }
diff --git a/tedge/Cargo.toml b/tedge/Cargo.toml
index b64801c0..c9f9f3a1 100644
--- a/tedge/Cargo.toml
+++ b/tedge/Cargo.toml
@@ -7,17 +7,17 @@ readme = "README.md"
[dependencies]
anyhow = "1.0.38"
chrono = "0.4.19"
-futures = "0.3"
-tokio = { version = "1.0", features = ["rt", "signal", "io-util"] }
+futures = "0.3.12"
+tokio = { version = "1.1.0", features = ["rt", "signal", "io-util"] }
mqtt_client = { path = "../mqtt/mqtt_client" }
rcgen = { version = "0.8.9", features = ["pem"] }
structopt = "0.3.21"
-thiserror = "1.0"
+thiserror = "1.0.23"
x509-parser = "0.9"
-zeroize = "1.2"
+zeroize = "1.2.0"
[dev-dependencies]
assert_cmd = "1.0.2"
pem = "0.8.2"
-predicates = "1.0.5"
+predicates = "1.0.6"
tempfile = "3.2.0"
diff --git a/tests/testlib/Cargo.toml b/tests/testlib/Cargo.toml
deleted file mode 100644
index 1b6f110a..00000000
--- a/tests/testlib/Cargo.toml
+++ /dev/null
@@ -1,9 +0,0 @@
-[package]
-name = "testlib"
-version = "0.1.0"
-authors = ["Pradeep K J <pradeekumar.kj@softwareag.com>"]
-edition = "2018"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
-
-[dependencies]
diff --git a/tests/testlib/src/lib.rs b/tests/testlib/src/lib.rs
deleted file mode 100644
index 4ead56a3..00000000
--- a/tests/testlib/src/lib.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-pub fn divide_non_zero_result(a: u32, b: u32) -> u32 {
- if b == 0 {
- panic!("Divide-by-zero error");
- } else if a < b {
- panic!("Divide result is zero");
- }
- a / b
-}
-
-#[cfg(test)]
-mod tests {
- use super::*;
-
- #[test]
- fn test_divide() {
- assert_eq!(divide_non_zero_result(10, 2), 5);
- }
-
- #[test]
- #[should_panic]
- fn test_any_panic() {
- divide_non_zero_result(1, 0);
- }
-
- #[test]
- #[should_panic(expected = "Divide result is zero")]
- fn test_specific_panic() {
- divide_non_zero_result(1, 10);
- }
-}
diff --git a/translator/c8y_json_translator/Cargo.toml b/translator/c8y_json_translator/Cargo.toml
index c4befd39..bece0a2e 100644
--- a/translator/c8y_json_translator/Cargo.toml
+++ b/translator/c8y_json_translator/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
chrono = "0.4.19"
json = "0.12.4"
-thiserror = "1.0"
+thiserror = "1.0.23"
[dev-dependencies]
pretty_assertions = "0.6.1"