Skip to content

Commit

Permalink
Add some debugg logging
Browse files Browse the repository at this point in the history
  • Loading branch information
weiznich committed Feb 7, 2024
1 parent 6f4b3bb commit ad8efff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,8 @@ jobs:
with:
components: "rust-src"
- name: Cache cargo registry
uses: actions/cache@v3
uses: Swatinem/rust-cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: postgres_bundled-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Install postgres (Linux)
run: |
Expand All @@ -467,11 +464,12 @@ jobs:
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
sudo service postgresql restart && sleep 3
echo "PG_DATABASE_URL=postgres://postgres:postgres@localhost/" >> $GITHUB_ENV
echo $PG_DATABASE_URL
- name: Install cargo valgrind
run: cargo +nightly install cargo-valgrind
- name: Test diesel-cli
run: cargo +nightly valgrind test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "postgres-bundled"
run: cargo +nightly test --manifest-path diesel_cli/Cargo.toml --no-default-features --features "postgres-bundled"

- name: Run diesel_tests with ASAN enabled
env:
Expand Down
1 change: 1 addition & 0 deletions diesel_cli/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ impl InferConnection {
}

fn from_url(database_url: String) -> Result<InferConnection, crate::errors::Error> {
dbg!(&database_url);
// we construct `InferConnection` manually
// here because that allows us to emit better error messages
// than the generic ` Invalid connection url for multiconnection`
Expand Down
1 change: 1 addition & 0 deletions diesel_cli/src/infer_schema_internals/pg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ mod test {
let connection_url = env::var("PG_DATABASE_URL")
.or_else(|_| env::var("DATABASE_URL"))
.expect("DATABASE_URL must be set in order to run tests");
dbg!(&connection_url);
let mut connection = PgConnection::establish(&connection_url).unwrap();
connection.begin_test_transaction().unwrap();
connection
Expand Down

0 comments on commit ad8efff

Please sign in to comment.