Skip to content

Commit 9b6433f

Browse files
committed
Fix CLI test failures
1 parent e052d27 commit 9b6433f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

diesel_cli/src/database.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ fn drop_database(database_url: &str) -> DatabaseResult<()> {
162162
#[cfg(feature="postgres")]
163163
Backend::Pg => {
164164
let (database, postgres_url) = change_database_of_url(database_url, "postgres");
165+
println!("Dropping database: {}", database);
165166
let conn = try!(PgConnection::establish(&postgres_url));
166167
try!(conn.silence_notices(|| {
167168
conn.execute(&format!("DROP DATABASE IF EXISTS {}", database))

diesel_cli/tests/database_reset.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,10 @@ fn reset_handles_postgres_urls_with_username_and_password() {
5555
db.execute("DROP ROLE IF EXISTS foo");
5656
db.execute("CREATE ROLE foo WITH LOGIN SUPERUSER PASSWORD 'password'");
5757

58+
let database_url = format!("postgres://foo:password@localhost/diesel_{}", p.name);
5859
let result = p.command("database")
5960
.arg("reset")
60-
.env("DATABASE_URL", &format!("postgres://foo:password@localhost/{}", p.name))
61+
.env("DATABASE_URL", &database_url)
6162
.run();
6263

6364
assert!(result.is_success(), "Result was unsuccessful {:?}", result.stdout());

0 commit comments

Comments
 (0)