@@ -30,26 +30,27 @@ async fn backup_restore() {
30
30
let _ = S3BucketCleaner :: new ( BUCKET ) . await ;
31
31
assert_bucket_occupancy ( BUCKET , true ) . await ;
32
32
33
- let listener_addr = format ! ( "0.0.0.0:{}" , PORT )
34
- . to_socket_addrs ( )
35
- . unwrap ( )
36
- . next ( )
37
- . unwrap ( ) ;
38
- let connection_addr = Url :: parse ( & format ! ( "http://localhost:{}" , PORT ) ) . unwrap ( ) ;
39
- let db_config = Config {
40
- bottomless_replication : Some ( bottomless:: replicator:: Options {
41
- create_bucket_if_not_exists : true ,
42
- verify_crc : true ,
43
- use_compression : bottomless:: replicator:: CompressionKind :: Gzip ,
44
- bucket_name : BUCKET . to_string ( ) ,
45
- max_batch_interval : Duration :: from_millis ( 250 ) ,
46
- restore_transaction_page_swap_after : 1 , // in this test swap should happen at least once
47
- ..bottomless:: replicator:: Options :: from_env ( ) . unwrap ( )
48
- } ) ,
49
- db_path : PATH . into ( ) ,
50
- http_addr : Some ( listener_addr) ,
51
- ..Config :: default ( )
52
- } ;
33
+ let listener_addr = format ! ( "0.0.0.0:{}" , PORT )
34
+ . to_socket_addrs ( )
35
+ . unwrap ( )
36
+ . next ( )
37
+ . unwrap ( ) ;
38
+ let connection_addr = Url :: parse ( & format ! ( "http://localhost:{}" , PORT ) ) . unwrap ( ) ;
39
+ let db_config = Config {
40
+ bottomless_replication : Some ( bottomless:: replicator:: Options {
41
+ create_bucket_if_not_exists : true ,
42
+ verify_crc : true ,
43
+ use_compression : bottomless:: replicator:: CompressionKind :: Gzip ,
44
+ bucket_name : BUCKET . to_string ( ) ,
45
+ max_batch_interval : Duration :: from_millis ( 250 ) ,
46
+ restore_transaction_page_swap_after : 1 , // in this test swap should happen at least once
47
+ aws_endpoint : Some ( S3_URL . to_string ( ) ) ,
48
+ ..bottomless:: replicator:: Options :: from_env ( ) . unwrap ( )
49
+ } ) ,
50
+ db_path : PATH . into ( ) ,
51
+ http_addr : Some ( listener_addr) ,
52
+ ..Config :: default ( )
53
+ } ;
53
54
54
55
{
55
56
tracing:: info!(
@@ -216,26 +217,27 @@ async fn rollback_restore() {
216
217
let _ = S3BucketCleaner :: new ( BUCKET ) . await ;
217
218
assert_bucket_occupancy ( BUCKET , true ) . await ;
218
219
219
- let listener_addr = format ! ( "0.0.0.0:{}" , PORT )
220
- . to_socket_addrs ( )
221
- . unwrap ( )
222
- . next ( )
223
- . unwrap ( ) ;
224
- let conn = Url :: parse ( & format ! ( "http://localhost:{}" , PORT ) ) . unwrap ( ) ;
225
- let db_config = Config {
226
- bottomless_replication : Some ( bottomless:: replicator:: Options {
227
- create_bucket_if_not_exists : true ,
228
- verify_crc : true ,
229
- use_compression : bottomless:: replicator:: CompressionKind :: Gzip ,
230
- bucket_name : BUCKET . to_string ( ) ,
231
- max_batch_interval : Duration :: from_millis ( 250 ) ,
232
- restore_transaction_page_swap_after : 1 , // in this test swap should happen at least once
233
- ..bottomless:: replicator:: Options :: from_env ( ) . unwrap ( )
234
- } ) ,
235
- db_path : PATH . into ( ) ,
236
- http_addr : Some ( listener_addr) ,
237
- ..Config :: default ( )
238
- } ;
220
+ let listener_addr = format ! ( "0.0.0.0:{}" , PORT )
221
+ . to_socket_addrs ( )
222
+ . unwrap ( )
223
+ . next ( )
224
+ . unwrap ( ) ;
225
+ let conn = Url :: parse ( & format ! ( "http://localhost:{}" , PORT ) ) . unwrap ( ) ;
226
+ let db_config = Config {
227
+ bottomless_replication : Some ( bottomless:: replicator:: Options {
228
+ create_bucket_if_not_exists : true ,
229
+ verify_crc : true ,
230
+ use_compression : bottomless:: replicator:: CompressionKind :: Gzip ,
231
+ bucket_name : BUCKET . to_string ( ) ,
232
+ max_batch_interval : Duration :: from_millis ( 250 ) ,
233
+ restore_transaction_page_swap_after : 1 , // in this test swap should happen at least once
234
+ aws_endpoint : Some ( S3_URL . to_string ( ) ) ,
235
+ ..bottomless:: replicator:: Options :: from_env ( ) . unwrap ( )
236
+ } ) ,
237
+ db_path : PATH . into ( ) ,
238
+ http_addr : Some ( listener_addr) ,
239
+ ..Config :: default ( )
240
+ } ;
239
241
240
242
{
241
243
tracing:: info!( "---STEP 1: create db, write row, rollback---" ) ;
0 commit comments