Skip to content

Commit

Permalink
Add missing database user to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamed2 committed Jun 3, 2019
1 parent ec243fa commit 93c0c5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ end
@test was_open
@test !isopen(saved_conn)

@test_throws ErrorException LibPQ.Connection("dbname=123fake"; throw_error=true) do jl_conn
@test_throws ErrorException LibPQ.Connection("dbname=123fake user=$DATABASE_USER"; throw_error=true) do jl_conn
@test false
end
end
Expand Down Expand Up @@ -536,7 +536,7 @@ end

@testset "Bad Connection" begin
@testset "throw_error=false" begin
conn = LibPQ.Connection("dbname=123fake"; throw_error=false)
conn = LibPQ.Connection("dbname=123fake user=$DATABASE_USER"; throw_error=false)
@test conn isa LibPQ.Connection
@test status(conn) == LibPQ.libpq_c.CONNECTION_BAD
@test isopen(conn)
Expand All @@ -552,9 +552,9 @@ end
end

@testset "throw_error=true" begin
@test_throws ErrorException LibPQ.Connection("dbname=123fake"; throw_error=true)
@test_throws ErrorException LibPQ.Connection("dbname=123fake user=$DATABASE_USER"; throw_error=true)

conn = LibPQ.Connection("dbname=123fake"; throw_error=false)
conn = LibPQ.Connection("dbname=123fake user=$DATABASE_USER"; throw_error=false)
@test conn isa LibPQ.Connection
@test status(conn) == LibPQ.libpq_c.CONNECTION_BAD
@test isopen(conn)
Expand Down

0 comments on commit 93c0c5d

Please sign in to comment.