Skip to content

Commit

Permalink
Fix a merge error in unftp-sbe-fs functional tests
Browse files Browse the repository at this point in the history
PRs #474 and #473 had another merge conflict that caused runtime test
failures.
  • Loading branch information
asomers authored and hannesdejager committed Sep 7, 2023
1 parent aa825bd commit 286e861
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions crates/unftp-sbe-fs/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,12 @@ async fn dele(#[future] harness: Harness) {
assert_eq!(std::fs::metadata(file_in_root.path()).unwrap_err().kind(), std::io::ErrorKind::NotFound);
}

#[rstest]
#[awt]
#[tokio::test]
async fn rmd() {
let addr = "127.0.0.1:1243";
let root = std::env::temp_dir();

tokio::spawn(libunftp::Server::with_fs(root.clone()).listen(addr));
tokio::time::sleep(std::time::Duration::new(1, 0)).await;
let mut ftp_stream = FtpStream::connect(addr).await.unwrap();
let dir_in_root = tempfile::tempdir_in(root).unwrap();
async fn rmd(#[future] harness: Harness) {
let mut ftp_stream = FtpStream::connect(harness.addr).await.unwrap();
let dir_in_root = tempfile::tempdir_in(harness.root).unwrap();
let file_name = dir_in_root.path().file_name().unwrap().to_str().unwrap();

ensure_login_required(ftp_stream.rm(file_name).await);
Expand Down

0 comments on commit 286e861

Please sign in to comment.