Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
CosminLazar committed Nov 22, 2024
1 parent 8bc8f2c commit b22169d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 57 deletions.
20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
chrono = { version = "0.4.26", features = ["serde"] }
config = { version = "0.14.0", features = ["toml"] }
reqwest = { version = "0.12.3", features = ["json"] }
chrono = { version = "0.4.38", features = ["serde"] }
config = { version = "0.14.1", features = ["toml"] }
reqwest = { version = "0.12.9", features = ["json"] }
rumqttc = "0.24.0"
serde = { version = "1.0.183", features = ["derive"] }
serde_json = "1.0.107"
tokio = { version = "1.34.0", features = ["full"] }
url = { version = "2.4.1", features = ["serde"] }
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
tokio = { version = "1.41.1", features = ["full"] }
url = { version = "2.5.4", features = ["serde"] }

[dev-dependencies]
fluent-asserter = "0.1.9"
mockito = "1.4.0"
testcontainers = "0.15.0"
mockito = "1.6.1"
testcontainers = "0.23.1"
assert-json-diff = "2.0.2"
insta = { version = "1.38.0", features = ["yaml", "filters"] }
insta = { version = "1.41.1", features = ["yaml", "filters"] }
24 changes: 18 additions & 6 deletions tests/full_flow_insta.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
mod hivemq;
mod mqtt;

use crate::mqtt::CollectingClient;
Expand All @@ -7,18 +6,31 @@ use ha_mitaffald::{
settings::Settings,
sync_data,
};
use hivemq::HiveMQContainer;
use rumqttc::Publish;
use serde::{Deserialize, Serialize};
use std::time::Duration;
use testcontainers::clients;
use testcontainers::{
core::{ContainerPort, WaitFor},
runners::AsyncRunner,
GenericImage, ImageExt,
};
use url::Url;

#[tokio::test]
async fn smoke_test_insta() {
let docker = clients::Cli::default();
let mqtt_server = docker.run(HiveMQContainer::default());
let mqtt_server_port = mqtt_server.get_host_port_ipv4(1883);
// GenericImage::new(name, tag).with_network(network)
let mqtt_server = GenericImage::new("hivemq/hivemq-ce", "latest")
.with_exposed_port(ContainerPort::Tcp(1883))
.with_wait_for(WaitFor::message_on_stdout("Started HiveMQ in"))
.with_network("bridge")
.start()
.await
.expect("Failed to start container, is Docker running?");

let mqtt_server_port = mqtt_server
.get_host_port_ipv4(1883)
.await
.expect("Failed to get port binding");

let mut mit_affald_server = mockito::Server::new_async().await;
let mit_affald_server_url = Url::parse(&mit_affald_server.url()).unwrap();
Expand Down
41 changes: 0 additions & 41 deletions tests/hivemq/mod.rs

This file was deleted.

0 comments on commit b22169d

Please sign in to comment.