Skip to content

Commit

Permalink
chore(deps) bump pgmoon from 1.13.0 to 1.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bungle committed Feb 18, 2022
1 parent e050b58 commit d0a3ce8
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 59 deletions.
2 changes: 1 addition & 1 deletion kong-2.7.0-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies = {
"version == 1.0.1",
"kong-lapis == 1.8.3.1",
"lua-cassandra == 1.5.1",
"pgmoon == 1.13.0",
"pgmoon == 1.14.0",
"luatz == 0.4",
"lua_system_constants == 0.1.4",
"lyaml == 6.2.7",
Expand Down
172 changes: 114 additions & 58 deletions spec/02-integration/03-db/01-db_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,13 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

assert.is_false(db.connector:get_stored_connection().ssl)

db:close()
end)
Expand All @@ -308,13 +310,13 @@ for _, strategy in helpers.each_strategy() do
assert.is_table(conn)

if strategy == "postgres" then
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_false(db.connector:get_stored_connection().config.ssl)

assert.is_false(db.connector:get_stored_connection().ssl)
elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

db:close()
end)
Expand All @@ -339,11 +341,12 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end
assert.is_true(db.connector:get_stored_connection().config.ssl)

assert.is_true(db.connector:get_stored_connection().ssl)
elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

db:close()
end)
Expand All @@ -367,13 +370,13 @@ for _, strategy in helpers.each_strategy() do
assert.is_table(conn)

if strategy == "postgres" then
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_true(db.connector:get_stored_connection().config.ssl)

assert.is_true(db.connector:get_stored_connection().ssl)
elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

db:close()
end)
Expand All @@ -398,7 +401,12 @@ for _, strategy in helpers.each_strategy() do
assert.is_nil(db.connector:get_stored_connection()) -- empty defaults to "write"

assert.equal("nginx", db.connector:get_stored_connection("read").sock_type)
assert.is_false(db.connector:get_stored_connection("read").ssl)

if strategy == "postgres" then
assert.is_false(db.connector:get_stored_connection("read").config.ssl)
elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("read").ssl)
end

db:close()
end)
Expand All @@ -423,10 +431,20 @@ for _, strategy in helpers.each_strategy() do
assert.is_nil(db.connector:get_stored_connection("read"))

assert.equal("luasocket", db.connector:get_stored_connection("write").sock_type)
assert.is_false(db.connector:get_stored_connection("write").ssl)

if strategy == "portgres" then
assert.is_false(db.connector:get_stored_connection("write").config.ssl)
elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_false(db.connector:get_stored_connection().ssl)

if strategy == "portgres" then
assert.is_false(db.connector:get_stored_connection("write").config.ssl)
elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

db:close()
end)
Expand All @@ -451,13 +469,16 @@ for _, strategy in helpers.each_strategy() do
assert.is_nil(err)
assert.is_table(conn)


if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

assert.is_false(db.connector:get_stored_connection().ssl)
assert.is_true(db:setkeepalive())

db:close()
Expand All @@ -477,13 +498,15 @@ for _, strategy in helpers.each_strategy() do
assert.is_table(conn)

if strategy == "postgres" then
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_false(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

assert.is_false(db.connector:get_stored_connection().ssl)

assert.is_true(db:setkeepalive())

db:close()
Expand All @@ -509,11 +532,13 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

assert.is_true(db.connector:get_stored_connection().ssl)
assert.is_true(db:setkeepalive())

db:close()
Expand All @@ -538,13 +563,15 @@ for _, strategy in helpers.each_strategy() do
assert.is_table(conn)

if strategy == "postgres" then
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_true(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

assert.is_true(db.connector:get_stored_connection().ssl)

assert.is_true(db:setkeepalive())

db:close()
Expand Down Expand Up @@ -599,8 +626,14 @@ for _, strategy in helpers.each_strategy() do
assert.equal("nginx", db.connector:get_stored_connection("read").sock_type)
assert.equal("nginx", db.connector:get_stored_connection("write").sock_type)

assert.is_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)
if strategy == "postgres" then
assert.is_false(db.connector:get_stored_connection("read").config.ssl)
assert.is_false(db.connector:get_stored_connection("write").config.ssl)

elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

assert.is_true(db:setkeepalive())

Expand Down Expand Up @@ -634,7 +667,11 @@ for _, strategy in helpers.each_strategy() do
assert.equal("luasocket", db.connector:get_stored_connection("write").sock_type)
assert.is_nil(db.connector:get_stored_connection("read"))

assert.is_false(db.connector:get_stored_connection("write").ssl)
if strategy == "postgres" then
assert.is_false(db.connector:get_stored_connection("write").config.ssl)
elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

assert.is_true(db:setkeepalive())

Expand Down Expand Up @@ -666,11 +703,14 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

assert.is_false(db.connector:get_stored_connection().ssl)

assert.is_true(db:close())
end)

Expand All @@ -689,11 +729,14 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_false(db.connector:get_stored_connection().ssl)
end

assert.is_false(db.connector:get_stored_connection().ssl)

assert.is_true(db:close())
end)

Expand All @@ -717,11 +760,13 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

assert.is_true(db.connector:get_stored_connection().ssl)
assert.is_true(db:close())
end)

Expand All @@ -744,13 +789,14 @@ for _, strategy in helpers.each_strategy() do
assert.is_table(conn)

if strategy == "postgres" then
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.equal("luasocket", db.connector:get_stored_connection().sock_type)
assert.is_true(db.connector:get_stored_connection().config.ssl)

elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
assert.is_true(db.connector:get_stored_connection().ssl)
end

assert.is_true(db.connector:get_stored_connection().ssl)
assert.is_true(db:close())
end)

Expand Down Expand Up @@ -803,8 +849,14 @@ for _, strategy in helpers.each_strategy() do
assert.equal("nginx", db.connector:get_stored_connection("read").sock_type)
assert.equal("nginx", db.connector:get_stored_connection("write").sock_type)

assert.is_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)
if strategy == "postgres" then
assert.is_false(db.connector:get_stored_connection("read").config.ssl)
assert.is_false(db.connector:get_stored_connection("write").config.ssl)

elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

assert.is_true(db:close())

Expand Down Expand Up @@ -837,7 +889,11 @@ for _, strategy in helpers.each_strategy() do
assert.equal("luasocket", db.connector:get_stored_connection("write").sock_type)
assert.is_nil(db.connector:get_stored_connection("read"))

assert.is_false(db.connector:get_stored_connection("write").ssl)
if strategy == "postgres" then
assert.is_false(db.connector:get_stored_connection("write").config.ssl)
elseif strategy == "cassandra" then
assert.is_false(db.connector:get_stored_connection("write").ssl)
end

assert.is_true(db:close())

Expand Down

0 comments on commit d0a3ce8

Please sign in to comment.