From eabffed162a3331d8c400127e68d3a83c257155c Mon Sep 17 00:00:00 2001 From: Eric Hanson <5846501+ericphanson@users.noreply.github.com> Date: Tue, 19 Jul 2022 12:28:13 +0200 Subject: [PATCH] run tests with both backends --- test/runtests.jl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 92dc42fa..b5176a0b 100755 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -51,8 +51,18 @@ include("awss3.jl") # creates `s3path_tests(config)` # Set `AWSConfig` as the default for the following tests aws = global_aws_config(AWSConfig()) - @testset "S3" begin - awss3_tests(aws) - s3path_tests(aws) + + prev_backend = AWS.DownloadsBackend[] + for backend in (AWS.HTTPBackend, AWS.DownloadsBackend) + AWS.DEFAULT_BACKEND[] = backend() + try + @testset "S3 with $backend" begin + awss3_tests(aws) + s3path_tests(aws) + end + finally + AWS.DEFAULT_BACKEND[] = prev_backend + end end + end