branch: elpa/pg
commit 076935568675b06bb2f36fdcea5dc3667c48267d
Author: Eric Marsden <eric.mars...@risk-engineering.org>
Commit: Eric Marsden <eric.mars...@risk-engineering.org>

    Tests: further workarounds for RisingWave variant
---
 test/Makefile   | 10 +++++-----
 test/test-pg.el | 13 ++++++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/test/Makefile b/test/Makefile
index 2007bb8126..51f7ec1959 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -900,9 +900,9 @@ test-immudb: test-pg.el
 test-greenplum: test-pg.el
        ${DOCKER} run --rm --name greenplum \
           --pull=newer \
-         --publish 5433:5432 \
-         -e PGPORT=5433 \
-         -d docker.io/andruche/greenplum:7
+          --publish 5433:5432 \
+          -e PGPORT=5433 \
+          -d docker.io/andruche/greenplum:7
        sleep 10
        PGURI=postgresql://gpadmin@localhost:5433/postgres $(MAKE) test
        ${DOCKER} stop greenplum
@@ -929,8 +929,8 @@ test-cloudberry: test-pg.el
 test-spanner: test-pg.el
        ${DOCKER} run --rm --name spanner \
           --pull=newer \
-         --publish 127.0.0.1:5499:5432 \
-         -d gcr.io/cloud-spanner-pg-adapter/pgadapter-emulator:latest -d 
pgeltestdb
+          --publish 127.0.0.1:5499:5432 \
+          -d gcr.io/cloud-spanner-pg-adapter/pgadapter-emulator:latest -d 
pgeltestdb
        sleep 2
        PGURI=postgresql://postgres@127.0.0.1:5499/pgeltestdb $(MAKE) test
        ${DOCKER} stop spanner
diff --git a/test/test-pg.el b/test/test-pg.el
index 6559443d2c..e3e7dd9d9a 100755
--- a/test/test-pg.el
+++ b/test/test-pg.el
@@ -342,7 +342,7 @@
                   :skip-variants '(xata cratedb questdb ydb vertica))
       ;; Many PostgreSQL variants only support UTF8 as the client encoding.
       (pgtest-add #'pg-test-client-encoding
-                  :skip-variants '(cratedb cockroachdb ydb risingwave 
materialize spanner greptimedb xata))
+                  :skip-variants '(cratedb cockroachdb ydb risingwave 
materialize spanner greptimedb xata vertica))
       (pgtest-add #'pg-test-unicode-names
                   :skip-variants '(xata cratedb cockroachdb risingwave questdb 
ydb spanner vertica))
       (pgtest-add #'pg-test-returning
@@ -358,7 +358,7 @@
       (pgtest-add #'pg-test-notify
                   :skip-variants '(cratedb cockroachdb risingwave materialize 
greptimedb ydb questdb spanner vertica))
       (pgtest-add #'pg-test-lo
-                  :skip-variants '(cratedb cockroachdb risingwave materialize 
greptimedb ydb questdb spanner vertica))
+                  :skip-variants '(cratedb cockroachdb risingwave materialize 
greptimedb ydb questdb spanner vertica greenplum))
       (dolist (test (reverse tests))
         (message "== Running test %s" test)
         (condition-case err
@@ -440,9 +440,12 @@
     ;; https://github.com/kagis/pgwire/blob/main/test/test.js
     (let ((typ (scalar "SELECT pg_typeof($1)::text" '((42 . "int4")))))
       (should (or (string= "integer" typ)
-                  (string= "bigint" typ)))) 
-    (should (equal (list "text" "foobles")
-                   (row "SELECT pg_typeof($1)::text, $1::text" '(("foobles" . 
"text")))))
+                  (string= "bigint" typ))))
+    (let ((typs (row "SELECT pg_typeof($1)::text, $1::text" '(("foobles" . 
"text")))))
+      (should (string= "foobles" (cl-second typs)))
+      (should (or (string= "text" (cl-first typs))
+                  ;; RisingWave returns this
+                  (string=" character varying" (cl-first typs)))))
     (unless (member (pgcon-server-variant con) '(cratedb risingwave 
materialize ydb))
       (let ((bv1 (make-bool-vector 1 nil))
             (bv2 (make-bool-vector 1 t)))

Reply via email to