From 3ade54d603291911b50acac5ab131a58700964a1 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Mon, 7 Oct 2024 18:59:30 -0700 Subject: [PATCH] Comment out clean_command_ok test Reviewed By: diliop Differential Revision: D64018129 fbshipit-source-id: 4e8879b05ed3d0d697c1b9b895f68bc710734775 --- tests/common/mod.rs | 1 + tests/dotslash_tests.rs | 67 ++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/tests/common/mod.rs b/tests/common/mod.rs index ee3ecb2..7f92c95 100644 --- a/tests/common/mod.rs +++ b/tests/common/mod.rs @@ -175,6 +175,7 @@ impl DotSlashTestEnv { Ok(self) } + #[allow(dead_code)] pub fn dotslash_cache(&self) -> &Path { &self.tempdir_path } diff --git a/tests/dotslash_tests.rs b/tests/dotslash_tests.rs index 912e617..efa9a35 100644 --- a/tests/dotslash_tests.rs +++ b/tests/dotslash_tests.rs @@ -636,40 +636,39 @@ caused by: expected no arguments but received some // "clean" Command // -/// TODO: The "clean" command currently has a bug where it will fail if any of -/// the entries in the cache are read-only. Re-enable this test once that has -/// been fixed. -#[ignore] -#[test] -fn clean_command_ok() { - let test_env = DotSlashTestEnv::try_new().unwrap(); - - let cache_dir = test_env.dotslash_cache(); - - // Cache dir exists, but should be empty. - assert!(cache_dir.exists()); - let is_empty = std::fs::read_dir(cache_dir).unwrap().next().is_none(); - assert!(is_empty); - - test_env - .dotslash_command() - .arg("tests/fixtures/http__tar_gz__print_argv") - .assert() - .success(); - - assert!(cache_dir.exists()); - - test_env - .dotslash_command() - .arg("--") - .arg("clean") - .assert() - .code(0) - .stdout_eq("") - .stderr_matches("Cleaning `[DOTSLASHCACHEDIR]`\n"); - - assert!(!cache_dir.exists()); -} +// TODO: The "clean" command currently has a bug where it will fail if any of +// the entries in the cache are read-only. Re-enable this test once that has +// been fixed. +// #[test] +// fn clean_command_ok() { +// let test_env = DotSlashTestEnv::try_new().unwrap(); + +// let cache_dir = test_env.dotslash_cache(); + +// // Cache dir exists, but should be empty. +// assert!(cache_dir.exists()); +// let is_empty = std::fs::read_dir(cache_dir).unwrap().next().is_none(); +// assert!(is_empty); + +// test_env +// .dotslash_command() +// .arg("tests/fixtures/http__tar_gz__print_argv") +// .assert() +// .success(); + +// assert!(cache_dir.exists()); + +// test_env +// .dotslash_command() +// .arg("--") +// .arg("clean") +// .assert() +// .code(0) +// .stdout_eq("") +// .stderr_matches("Cleaning `[DOTSLASHCACHEDIR]`\n"); + +// assert!(!cache_dir.exists()); +// } #[test] fn clean_command_extra_args() {