@@ -6,7 +6,7 @@ using RustyObjectStore
6
6
7
7
using Test: @testset , @test , @test_throws
8
8
9
- export run_read_write_test_cases, run_stream_test_cases
9
+ export run_read_write_test_cases, run_stream_test_cases, run_sanity_test_cases
10
10
11
11
function run_stream_test_cases (config:: AbstractConfig )
12
12
# ReadStream
@@ -516,6 +516,20 @@ function run_read_write_test_cases(read_config::AbstractConfig, write_config::Ab
516
516
end
517
517
518
518
end
519
+
520
+ function run_sanity_test_cases (read_config:: AbstractConfig , write_config:: AbstractConfig = read_config)
521
+ @testset " Round trip" begin
522
+ input = " 1,2,3,4,5,6,7,8,9,1\n "
523
+ buffer = Vector {UInt8} (undef, length (input))
524
+
525
+ nbytes_written = put_object (codeunits (input), " roundtrip.csv" , write_config)
526
+ @test nbytes_written == length (input)
527
+
528
+ nbytes_read = get_object! (buffer, " roundtrip.csv" , read_config)
529
+ @test nbytes_read == length (input)
530
+ @test String (buffer[1 : nbytes_read]) == input
531
+ end
532
+ end
519
533
end # @testsetup
520
534
521
535
@testitem " Basic BlobStorage usage" setup= [InitializeObjectStore, ReadWriteCases] begin
@@ -537,6 +551,15 @@ Azurite.with(; debug=true, public=false) do conf
537
551
538
552
run_read_write_test_cases (config)
539
553
run_stream_test_cases (config)
554
+
555
+ config_padded = AzureConfig (;
556
+ storage_account_name= _credentials. auth. account * " \n " ,
557
+ container_name= _container. name * " \n " ,
558
+ storage_account_key= _credentials. auth. key * " \n " ,
559
+ host= base_url * " \n "
560
+ )
561
+
562
+ run_sanity_test_cases (config_padded)
540
563
end # Azurite.with
541
564
542
565
end # @testitem
@@ -588,6 +611,15 @@ Minio.with(; debug=true, public=false) do conf
588
611
run_read_write_test_cases (config)
589
612
run_stream_test_cases (config)
590
613
614
+ config_padded = AWSConfig (;
615
+ region= default_region * " \n " ,
616
+ bucket_name= _container. name * " \n " ,
617
+ access_key_id= _credentials. access_key_id * " \n " ,
618
+ secret_access_key= _credentials. secret_access_key * " \n " ,
619
+ host= base_url * " \n "
620
+ )
621
+
622
+ run_sanity_test_cases (config_padded)
591
623
end # Minio.with
592
624
end # @testitem
593
625
0 commit comments