comment-out system call-invoking function

This commit is contained in:
glyph 2022-01-14 15:30:54 +02:00
parent 6fb4a2406b
commit 552c4b419e

View File

@ -325,6 +325,13 @@ fn network_settings_menu_html() {
assert!(body.contains("Network Configuration"));
}
/*
NOTE: these tests are commented-out for the moment, due to the fact that they
invoke system commands (resulting in a `sudo` password request during
test execution). see if we can find a way to test the results without
triggering the `systemctl` call.
#[test]
fn deploy_ap() {
let client = Client::tracked(init_test_rocket(DISABLE_AUTH)).expect("valid rocket instance");
@ -334,6 +341,16 @@ fn deploy_ap() {
assert_eq!(response.content_type(), None);
}
#[test]
fn deploy_client() {
let client = Client::tracked(init_test_rocket(DISABLE_AUTH)).expect("valid rocket instance");
let response = client.get("/settings/network/wifi/activate").dispatch();
// check for 303 status (redirect)
assert_eq!(response.status(), Status::SeeOther);
assert_eq!(response.content_type(), None);
}
*/
#[test]
fn dns_settings_html() {
let client = Client::tracked(init_test_rocket(DISABLE_AUTH)).expect("valid rocket instance");
@ -370,15 +387,6 @@ fn ap_details_html() {
//assert!(body.contains("Network not found"));
}
#[test]
fn deploy_client() {
let client = Client::tracked(init_test_rocket(DISABLE_AUTH)).expect("valid rocket instance");
let response = client.get("/settings/network/wifi/activate").dispatch();
// check for 303 status (redirect)
assert_eq!(response.status(), Status::SeeOther);
assert_eq!(response.content_type(), None);
}
#[test]
fn add_ap_html() {
let client = Client::tracked(init_test_rocket(DISABLE_AUTH)).expect("valid rocket instance");