Skip to content

Commit

Permalink
Revert "chore(deps) bump pgmoon from 1.13.0 to 1.14.0 (#8429)"
Browse files Browse the repository at this point in the history
This reverts commit cd9dbb1.
  • Loading branch information
kikito committed Feb 28, 2022
1 parent d6af4f9 commit 64cf416
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 115 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.14.0",
"pgmoon == 1.13.0",
"luatz == 0.4",
"lua_system_constants == 0.1.4",
"lyaml == 6.2.7",
Expand Down
172 changes: 58 additions & 114 deletions spec/02-integration/03-db/01-db_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,11 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", 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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

db:close()
end)
Expand All @@ -310,14 +308,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)
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)
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

db:close()
end)

Expand All @@ -341,13 +339,12 @@ for _, strategy in helpers.each_strategy() do

if strategy == "postgres" then
assert.equal("nginx", 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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

db:close()
end)

Expand All @@ -370,14 +367,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)
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)
assert.equal("luasocket",
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().ssl)

db:close()
end)

Expand All @@ -401,12 +398,7 @@ 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)

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
assert.is_false(db.connector:get_stored_connection("read").ssl)

db:close()
end)
Expand All @@ -431,20 +423,10 @@ 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)

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.is_false(db.connector:get_stored_connection("write").ssl)

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

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.is_false(db.connector:get_stored_connection().ssl)

db:close()
end)
Expand All @@ -469,16 +451,13 @@ 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)
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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

db:close()
Expand All @@ -498,15 +477,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)
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)
assert.equal("luasocket",
db.connector:get_stored_connection().sock_type)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end


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

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

if strategy == "postgres" then
assert.equal("nginx", 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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

db:close()
Expand All @@ -563,15 +538,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)
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)
assert.equal("luasocket",
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().ssl)
assert.is_true(db:setkeepalive())

db:close()
Expand Down Expand Up @@ -626,14 +599,8 @@ 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)

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_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)

assert.is_true(db:setkeepalive())

Expand Down Expand Up @@ -667,11 +634,7 @@ 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"))

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_false(db.connector:get_stored_connection("write").ssl)

assert.is_true(db:setkeepalive())

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

if strategy == "postgres" then
assert.equal("nginx", 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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end


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

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

if strategy == "postgres" then
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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end


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

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

if strategy == "postgres" then
assert.equal("nginx", 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)
--elseif strategy == "cassandra" then
--TODO: cassandra forces luasocket on timer
end

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

Expand All @@ -789,14 +744,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)
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)
assert.equal("luasocket",
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().ssl)
assert.is_true(db:close())
end)

Expand Down Expand Up @@ -849,14 +803,8 @@ 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)

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_false(db.connector:get_stored_connection("read").ssl)
assert.is_false(db.connector:get_stored_connection("write").ssl)

assert.is_true(db:close())

Expand Down Expand Up @@ -889,11 +837,7 @@ 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"))

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_false(db.connector:get_stored_connection("write").ssl)

assert.is_true(db:close())

Expand Down

0 comments on commit 64cf416

Please sign in to comment.