Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't use in memory datastores for chat client dht in integration tests #5399

Merged
merged 2 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion integration_tests/src/chat_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use tari_comms::{
peer_manager::{Peer, PeerFeatures},
NodeIdentity,
};
use tari_comms_dht::{store_forward::SafConfig, DhtConfig, NetworkDiscoveryConfig};
use tari_comms_dht::{store_forward::SafConfig, DbConnectionUrl, DhtConfig, NetworkDiscoveryConfig};
use tari_p2p::{P2pConfig, TcpTransportConfig, TransportConfig};

use crate::{base_node_process::get_base_dir, get_port};
Expand Down Expand Up @@ -58,6 +58,7 @@ fn test_config(name: &str, port: u64, identity: &NodeIdentity) -> P2pConfig {
let mut config = P2pConfig {
datastore_path: temp_dir_path.clone(),
dht: DhtConfig {
database_url: DbConnectionUrl::file("dht.sqlite"),
network_discovery: NetworkDiscoveryConfig {
enabled: true,
..NetworkDiscoveryConfig::default()
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/src/chat_ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ use tari_comms::{
peer_manager::{Peer, PeerFeatures},
NodeIdentity,
};
use tari_comms_dht::{store_forward::SafConfig, DhtConfig, NetworkDiscoveryConfig};
use tari_comms_dht::{store_forward::SafConfig, DbConnectionUrl, DhtConfig, NetworkDiscoveryConfig};
use tari_contacts::contacts_service::{service::ContactOnlineStatus, types::Message};
use tari_p2p::{P2pConfig, TcpTransportConfig, TransportConfig};
use tari_utilities::message_format::MessageFormat;
Expand Down Expand Up @@ -183,6 +183,7 @@ fn test_config(base_dir: &PathBuf, identity: &NodeIdentity) -> P2pConfig {
let mut config = P2pConfig {
datastore_path: base_dir.clone(),
dht: DhtConfig {
database_url: DbConnectionUrl::file("dht.sqlite"),
network_discovery: NetworkDiscoveryConfig {
enabled: true,
..NetworkDiscoveryConfig::default()
Expand Down