From 91b5680b22570f88d613fe10b57aaf615e4da6b5 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Thu, 8 Aug 2024 14:53:28 +0000
Subject: [PATCH] chore: Improve the tests
Signed-off-by: Awiteb
---
src/storage.rs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/storage.rs b/src/storage.rs
index 5899590..1919a8c 100644
--- a/src/storage.rs
+++ b/src/storage.rs
@@ -188,11 +188,11 @@ where
}
#[cfg(test)]
+#[cfg(feature = "cacache-storage")]
mod tests {
use super::*;
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_store_captcha() {
let storage = CacacheStorage::new(
tempfile::tempdir()
@@ -215,7 +215,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_clear_expired() {
let storage = CacacheStorage::new(
tempfile::tempdir()
@@ -240,7 +239,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_clear_by_token() {
let storage = CacacheStorage::new(
tempfile::tempdir()
@@ -265,7 +263,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_is_token_exist() {
let storage = CacacheStorage::new(
tempfile::tempdir()
@@ -291,7 +288,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_get_answer() {
let storage = CacacheStorage::new(
tempfile::tempdir()
@@ -319,7 +315,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_cache_dir() {
let cache_dir = tempfile::tempdir()
.expect("failed to create temp file")
@@ -330,7 +325,6 @@ mod tests {
}
#[tokio::test]
- #[cfg(feature = "cacache-storage")]
async fn cacache_clear_expired_with_expired_after() {
let storage = CacacheStorage::new(
tempfile::tempdir()