Skip to content

Commit ece4b9a

Browse files
committed
Fix upgraded assert_cmd usage
1 parent e086842 commit ece4b9a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ Database support
3030
Development
3131
-----------
3232
To test the Postgres/ODBC support do the following (on OS X):
33-
1. `docker run -P postgres -d` to get a PostgreSQL server running
33+
1. `docker run -P -d postgres` to get a PostgreSQL server running
3434
2. `brew install psqlodbc sqliteodbc`
3535
3. ``POSTGRES_SERVER=localhost POSTGRES_PORT=32768 POSTGRES_USERNAME=postgres POSTGRES_PASSWORD= RUST_BACKTRACE=1 POSTGRES_DRIVER=`brew --prefix psqlodbc`/lib/psqlodbca.so SQLITE_DRIVER=`brew --prefix sqliteodbc`/lib/libsqlite3odbc-0.9996.dylib cargo test -- --nocapture``

tests/cli.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
use assert_cmd::prelude::*;
1+
use assert_cmd::Command;
22
use predicates::prelude::*;
3-
use std::process::Command;
43

54
extern crate wait_for_db;
65

76
#[test]
87
#[cfg_attr(postgres_driver = "", ignore)]
98
fn command_line_timeout_with_odbc() -> Result<(), Box<dyn std::error::Error>> {
10-
let mut cmd = Command::main_binary()?;
9+
let mut cmd = Command::cargo_bin(env!("CARGO_PKG_NAME"))?;
1110
cmd.arg("--timeout=1")
1211
.arg("--mode=odbc")
1312
.arg(format!(
@@ -27,7 +26,7 @@ fn command_line_timeout_with_odbc() -> Result<(), Box<dyn std::error::Error>> {
2726
#[test]
2827
#[cfg_attr(postgres_driver = "", ignore)]
2928
fn command_line_timeout_with_postgres() -> Result<(), Box<dyn std::error::Error>> {
30-
let mut cmd = Command::main_binary()?;
29+
let mut cmd = Command::cargo_bin(env!("CARGO_PKG_NAME"))?;
3130
cmd.arg("--timeout=1")
3231
.arg("--mode=postgres")
3332
.arg(format!(

0 commit comments

Comments
 (0)