From e46f3916ecc3223b6307e1e228edd62bf6a72dc1 Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Wed, 21 Aug 2024 15:01:07 -0500 Subject: [PATCH] add pg_net tests --- nix/tests/expected/pg_net.out | 11 +++++++++++ nix/tests/sql/pg_net.sql | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 nix/tests/expected/pg_net.out create mode 100644 nix/tests/sql/pg_net.sql diff --git a/nix/tests/expected/pg_net.out b/nix/tests/expected/pg_net.out new file mode 100644 index 000000000..6b3ca5b4b --- /dev/null +++ b/nix/tests/expected/pg_net.out @@ -0,0 +1,11 @@ +-- This is a very basic test because you can't get the value returned +-- by a pg_net request in the same transaction that created it; +select + net.http_get ( + 'https://postman-echo.com/get?foo1=bar1&foo2=bar2' + ) as request_id; + request_id +------------ + 1 +(1 row) + diff --git a/nix/tests/sql/pg_net.sql b/nix/tests/sql/pg_net.sql new file mode 100644 index 000000000..bf44db5a3 --- /dev/null +++ b/nix/tests/sql/pg_net.sql @@ -0,0 +1,7 @@ +-- This is a very basic test because you can't get the value returned +-- by a pg_net request in the same transaction that created it; + +select + net.http_get ( + 'https://postman-echo.com/get?foo1=bar1&foo2=bar2' + ) as request_id;