File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -365,16 +365,13 @@ impl PostgreSQL {
365
365
self . settings. host,
366
366
self . settings. port
367
367
) ;
368
- let psql = PsqlBuilder :: new ( )
368
+ let psql = PsqlBuilder :: from ( & self . settings )
369
369
. program_dir ( self . settings . binary_dir ( ) )
370
370
. command ( format ! (
371
371
"DROP DATABASE IF EXISTS \" {}\" " ,
372
372
database_name. as_ref( )
373
373
) )
374
- . host ( & self . settings . host )
375
- . port ( self . settings . port )
376
- . username ( & self . settings . username )
377
- . pg_password ( & self . settings . password )
374
+ . username ( BOOTSTRAP_SUPERUSER )
378
375
. no_psqlrc ( ) ;
379
376
380
377
match self . execute_command ( psql) . await {
Original file line number Diff line number Diff line change @@ -159,5 +159,8 @@ async fn test_username_setting() -> Result<()> {
159
159
postgresql. create_database ( database_name) . await ?;
160
160
let database_exists = postgresql. database_exists ( database_name) . await ?;
161
161
assert ! ( database_exists) ;
162
+ postgresql. drop_database ( database_name) . await ?;
163
+ let database_exists = postgresql. database_exists ( database_name) . await ?;
164
+ assert ! ( !database_exists) ;
162
165
Ok ( ( ) )
163
166
}
You can’t perform that action at this time.
0 commit comments