upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tests/init.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-03-04 10:54:38 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-03-04 10:54:38 +0000
commitb02b4754c027bd751825c8e3b96766a5898187b1 (patch)
tree5d82b0a1f3094eb5cc7968d4607fd51d713f3bba /tests/init.rs
parent6e48a90620cc083ab3617a6583123de9e721b181 (diff)
test: ensure failed tests timeout
resolve a long standing test issue where failures to output the correct message in the cli would result in the test never ending rather than failing the many test cases updated in this change are to ensure failures are caught rather than ignored some of them are just refactored to remove calling an extra function, which is no longer needed note: this doesn't fix the intermittent issue, most commonly experienced under the nix configuration, where tests that should pass occationally never end preventing the rest of the suite from running
Diffstat (limited to 'tests/init.rs')
-rw-r--r--tests/init.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/init.rs b/tests/init.rs
index 7c69784..2083c82 100644
--- a/tests/init.rs
+++ b/tests/init.rs
@@ -441,7 +441,9 @@ mod when_repo_not_previously_claimed {
441 mod cli_ouput { 441 mod cli_ouput {
442 use super::*; 442 use super::*;
443 443
444 async fn run_test_async() -> Result<()> { 444 #[tokio::test]
445 #[serial]
446 async fn check_cli_output() -> Result<()> {
445 let git_repo = prep_git_repo()?; 447 let git_repo = prep_git_repo()?;
446 448
447 // fallback (51,52) user write (53, 55) repo (55, 56) blaster (57) 449 // fallback (51,52) user write (53, 55) repo (55, 56) blaster (57)
@@ -504,13 +506,6 @@ mod when_repo_not_previously_claimed {
504 cli_tester_handle.join().unwrap()?; 506 cli_tester_handle.join().unwrap()?;
505 Ok(()) 507 Ok(())
506 } 508 }
507
508 #[tokio::test]
509 #[serial]
510 async fn check_cli_output() -> Result<()> {
511 run_test_async().await?;
512 Ok(())
513 }
514 } 509 }
515 } 510 }
516 // TODO: cli caputuring input 511 // TODO: cli caputuring input