supabase-postgres.git / summary / log / commit / refs
commit 263230df38451b09bea8b194bb2acff8b6b67bc0
Author: Oliver Rice <github@oliverrice.com>
Commit: GitHub <noreply@github.com>
Date: Fri Aug 23 17:12:56 2024 +0000
add pgtap test (#1170)
nix/tests/expected/pgtap.out | 21 +++++++++++++++++++++
nix/tests/sql/pgtap.sql | 11 +++++++++++
2 files changed, 32 insertions(+)
diff --git a/nix/tests/expected/pgtap.out b/nix/tests/expected/pgtap.out
new file mode 100644
index 00000000..272d8387
--- /dev/null
+++ b/nix/tests/expected/pgtap.out
@@ -0,0 +1,21 @@
+begin;
+select plan(1);
+ plan
+------
+ 1..1
+(1 row)
+
+-- Run the tests.
+select pass( 'My test passed, w00t!' );
+ pass
+------------------------------
+ ok 1 - My test passed, w00t!
+(1 row)
+
+-- Finish the tests and clean up.
+select * from finish();
+ finish
+--------
+(0 rows)
+
+rollback;
diff --git a/nix/tests/sql/pgtap.sql b/nix/tests/sql/pgtap.sql
new file mode 100644
index 00000000..b99976a2
--- /dev/null
+++ b/nix/tests/sql/pgtap.sql
@@ -0,0 +1,11 @@
+begin;
+
+select plan(1);
+
+-- Run the tests.
+select pass( 'My test passed, w00t!' );
+
+-- Finish the tests and clean up.
+select * from finish();
+
+rollback;
[parent: 039667b2d43a]