Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps) bump pgmoon from 1.13.0 to 1.14.0 #8429

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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