arcbox-helper 0.4.21

Privileged helper daemon for host mutations (routes, DNS, sockets)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Integration tests for connection handling and version reporting.

mod common;

use arcbox_helper::client::{Client, ClientError};

#[tokio::test]
async fn version_returns_crate_version() {
    let (client, _dir) = common::setup().await;
    let version = client.version().await.unwrap();
    assert_eq!(version, env!("CARGO_PKG_VERSION"));
}

#[tokio::test]
async fn connection_refused_when_no_server() {
    let err = Client::connect_to("/tmp/arcbox-helper-nonexistent.sock").await;
    assert!(matches!(err, Err(ClientError::Connection(_))));
}