File tree 1 file changed +15
-5
lines changed 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -1262,10 +1262,8 @@ async fn test_container_write_derive() -> Result<()> {
1262
1262
Ok ( ( ) )
1263
1263
}
1264
1264
1265
- /// Test for zstd
1266
- /// We need to handle the case of modified hardlinks into /sysroot
1267
- #[ tokio:: test]
1268
- async fn test_container_zstd ( ) -> Result < ( ) > {
1265
+ /// Implementation of a test case for non-gzip (i.e. zstd or zstd:chunked) compression
1266
+ async fn test_non_gzip ( format : & str ) -> Result < ( ) > {
1269
1267
let fixture = Fixture :: new_v1 ( ) ?;
1270
1268
let baseimg = & fixture. export_container ( ) . await ?. 0 ;
1271
1269
let basepath = & match baseimg. transport {
@@ -1277,7 +1275,7 @@ async fn test_container_zstd() -> Result<()> {
1277
1275
let st = tokio:: process:: Command :: new ( "skopeo" )
1278
1276
. args ( [
1279
1277
"copy" ,
1280
- "--dest-compress-format=zstd" ,
1278
+ & format ! ( "--dest-compress-format={format}" ) ,
1281
1279
baseimg_ref. as_str ( ) ,
1282
1280
& format ! ( "oci:{zstd_image_path}" ) ,
1283
1281
] )
@@ -1303,6 +1301,18 @@ async fn test_container_zstd() -> Result<()> {
1303
1301
Ok ( ( ) )
1304
1302
}
1305
1303
1304
+ /// Test for zstd
1305
+ #[ tokio:: test]
1306
+ async fn test_container_zstd ( ) -> Result < ( ) > {
1307
+ test_non_gzip ( "zstd" ) . await
1308
+ }
1309
+
1310
+ /// Test for zstd:chunked
1311
+ #[ tokio:: test]
1312
+ async fn test_container_zstd_chunked ( ) -> Result < ( ) > {
1313
+ test_non_gzip ( "zstd:chunked" ) . await
1314
+ }
1315
+
1306
1316
/// Test for https://github.com/ostreedev/ostree-rs-ext/issues/405
1307
1317
/// We need to handle the case of modified hardlinks into /sysroot
1308
1318
#[ tokio:: test]
You can’t perform that action at this time.
0 commit comments