chore: Improve the tests

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-08-08 14:53:28 +00:00
parent e6121b3f52
commit 91b5680b22
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F

View file

@ -188,11 +188,11 @@ where
} }
#[cfg(test)] #[cfg(test)]
#[cfg(feature = "cacache-storage")]
mod tests { mod tests {
use super::*; use super::*;
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_store_captcha() { async fn cacache_store_captcha() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()
@ -215,7 +215,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_clear_expired() { async fn cacache_clear_expired() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()
@ -240,7 +239,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_clear_by_token() { async fn cacache_clear_by_token() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()
@ -265,7 +263,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_is_token_exist() { async fn cacache_is_token_exist() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()
@ -291,7 +288,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_get_answer() { async fn cacache_get_answer() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()
@ -319,7 +315,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_cache_dir() { async fn cacache_cache_dir() {
let cache_dir = tempfile::tempdir() let cache_dir = tempfile::tempdir()
.expect("failed to create temp file") .expect("failed to create temp file")
@ -330,7 +325,6 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
#[cfg(feature = "cacache-storage")]
async fn cacache_clear_expired_with_expired_after() { async fn cacache_clear_expired_with_expired_after() {
let storage = CacacheStorage::new( let storage = CacacheStorage::new(
tempfile::tempdir() tempfile::tempdir()