about summary refs log tree commit diff
path: root/tvix/glue/src/decompression.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-04-19T13·55+0300
committerclbot <clbot@tvl.fyi>2024-04-19T19·22+0000
commit8a40c92f5d62466d51b9e59a79cff3108aeff1d7 (patch)
tree5cade55ef98a1c0f149e9682e91e287c4d5806e9 /tvix/glue/src/decompression.rs
parent8f255d3e64c040ec152d0f394066db95ff102568 (diff)
chore(tvix/glue): migrate from test_case to rstest r/7977
Change-Id: Id1bac94e7b95960dabd55f095f04bdabfeee10ea
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11476
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/glue/src/decompression.rs')
-rw-r--r--tvix/glue/src/decompression.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/tvix/glue/src/decompression.rs b/tvix/glue/src/decompression.rs
index 7e526932e717..11dc9d98352a 100644
--- a/tvix/glue/src/decompression.rs
+++ b/tvix/glue/src/decompression.rs
@@ -183,7 +183,7 @@ mod tests {
 
     use async_compression::tokio::bufread::GzipEncoder;
     use futures::TryStreamExt;
-    use test_case::test_case;
+    use rstest::rstest;
     use tokio::io::{AsyncReadExt, BufReader};
     use tokio_tar::Archive;
 
@@ -203,11 +203,12 @@ mod tests {
         assert_eq!(data[..], round_tripped[..]);
     }
 
-    #[test_case(include_bytes!("tests/blob.tar.gz"); "gzip")]
-    #[test_case(include_bytes!("tests/blob.tar.bz2"); "bzip2")]
-    #[test_case(include_bytes!("tests/blob.tar.xz"); "xz")]
+    #[rstest]
+    #[case::gzip(include_bytes!("tests/blob.tar.gz"))]
+    #[case::bzip2(include_bytes!("tests/blob.tar.bz2"))]
+    #[case::xz(include_bytes!("tests/blob.tar.xz"))]
     #[tokio::test]
-    async fn compressed_tar(data: &[u8]) {
+    async fn compressed_tar(#[case] data: &[u8]) {
         let reader = DecompressedReader::new(BufReader::new(data));
         let mut archive = Archive::new(reader);
         let mut entries: Vec<_> = archive.entries().unwrap().try_collect().await.unwrap();