From 19e42c7f69b7afe32ba75cae23cd1f823004311c Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Fri, 31 Jul 2026 18:28:07 -0500 Subject: [PATCH] Adopt pgxntool's test/install to decouple installation from the test suite Per pgxntool/README.asc's test/install and Update & Upgrade (U&U) Testing sections: count_nulls is now installed once, committed, by test/install/load.sql before the main test/sql/ schedule runs, instead of each test file doing its own CREATE EXTENSION via test/deps.sql. This is phase 1 of several - fresh-only, no schema targeting yet (that's a follow-up) - laying the foundation update/upgrade testing needs: test/install runs in its own committed session, so a later ALTER EXTENSION UPDATE there can actually commit, unlike inside test/deps.sql's per-test rolled-back transaction. Retires the old ad hoc pattern where each test file hardcoded its own literal schema name (\set schema ...) as a stand-in for real schema-qualification coverage. test/sql/simple.sql is now a strict subset of extension_tests.sql (same assertions, same install) and test/sql/sanity.sql's own bare CREATE EXTENSION would now conflict with test/install's already-committed install - both removed; their behavioral coverage was already redundant with test__functionality. Side effect worth noting: since test/install runs in its own bare connection (not the in-suite session tap_setup.sql runs in), the extension now lands in 'public' rather than pgTap's own schema - this is the ONLY landing location for an untargeted install now, which incidentally eliminates a source of expected-output divergence between entry points that a schema-targeting phase would otherwise have needed to handle separately. Verified: make test / make verify-results pass against PG17. Co-Authored-By: Claude Sonnet 5 --- Makefile | 4 ++ test/core/functions.sql | 8 ++- test/deps.sql | 12 ++-- test/expected/extension_tests.out | 94 +++++++++++++++---------------- test/expected/sanity.out | 12 ---- test/expected/simple.out | 71 ----------------------- test/install/.gitignore | 2 + test/install/load.sql | 12 ++++ test/sql/extension_tests.sql | 30 ++++------ test/sql/sanity.sql | 11 ---- test/sql/simple.sql | 11 ---- 11 files changed, 88 insertions(+), 179 deletions(-) delete mode 100644 test/expected/sanity.out delete mode 100644 test/expected/simple.out create mode 100644 test/install/.gitignore create mode 100644 test/install/load.sql delete mode 100644 test/sql/sanity.sql delete mode 100644 test/sql/simple.sql diff --git a/Makefile b/Makefile index e57011a..71b142d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +# Explicit, not auto-detected: fail loudly if test/install/ ever ends up +# empty by accident, rather than silently falling back to per-test install. +PGXNTOOL_ENABLE_TEST_INSTALL = yes + include pgxntool/base.mk # Temporary hack diff --git a/test/core/functions.sql b/test/core/functions.sql index 482526c..e755178 100644 --- a/test/core/functions.sql +++ b/test/core/functions.sql @@ -219,6 +219,12 @@ BEGIN END $body$; -SET SEARCH_PATH = _null_count_test, tap, :schema; +/* + * No explicit target schema to restore in phase 1 (count_nulls installs + * with no schema targeting at all - see test/install/load.sql), so this + * just re-states the same search_path already set at the top of this file. + * A later schema-targeting phase may need this to do more. + */ +SET SEARCH_PATH = _null_count_test, tap; -- vi: expandtab sw=2 ts=2 diff --git a/test/deps.sql b/test/deps.sql index 9705f9f..9aeb1ef 100644 --- a/test/deps.sql +++ b/test/deps.sql @@ -1,8 +1,6 @@ -- Add any test dependency statements here --- IF NOT EXISTS will emit NOTICEs, which is annoying -SET client_min_messages = WARNING; -CREATE SCHEMA IF NOT EXISTS :schema; -SET search_path = :schema; -SET client_min_messages = NOTICE; - -CREATE EXTENSION count_nulls; +-- +-- count_nulls itself is no longer installed here: test/install/load.sql +-- installs it once, committed, before any test/sql/*.sql file runs (see +-- pgxntool/README.asc's "test/install" section) - so it's already present +-- by the time this per-test (rolled-back) file loads. diff --git a/test/expected/extension_tests.out b/test/expected/extension_tests.out index 3a22c24..7bf8f0e 100644 --- a/test/expected/extension_tests.out +++ b/test/expected/extension_tests.out @@ -1,87 +1,85 @@ \set ECHO none # Subtest: _null_count_test.test__check_ncs() - ok 1 - ok 2 - schema schema_to_load_count_nulls should not be in search path - 1..2 + ok 1 - ncs() resolves to the schema count_nulls actually installed in + 1..1 ok 1 - _null_count_test.test__check_ncs # Subtest: _null_count_test.test__definition() ok 1 - ensure null_count({anyarray}) is not in search_path - ok 2 - Function schema_to_load_count_nulls.null_count(anyarray) should return integer - ok 3 - Function schema_to_load_count_nulls.null_count(anyarray) should not be strict - ok 4 - Function schema_to_load_count_nulls.null_count(anyarray) should be IMMUTABLE + ok 2 - Function public.null_count(anyarray) should return integer + ok 3 - Function public.null_count(anyarray) should not be strict + ok 4 - Function public.null_count(anyarray) should be IMMUTABLE ok 5 - ensure null_count({json}) is not in search_path - ok 6 - Function schema_to_load_count_nulls.null_count(json) should return integer - ok 7 - Function schema_to_load_count_nulls.null_count(json) should not be strict - ok 8 - Function schema_to_load_count_nulls.null_count(json) should be IMMUTABLE + ok 6 - Function public.null_count(json) should return integer + ok 7 - Function public.null_count(json) should not be strict + ok 8 - Function public.null_count(json) should be IMMUTABLE ok 9 - ensure null_count({jsonb}) is not in search_path - ok 10 - Function schema_to_load_count_nulls.null_count(jsonb) should return integer - ok 11 - Function schema_to_load_count_nulls.null_count(jsonb) should not be strict - ok 12 - Function schema_to_load_count_nulls.null_count(jsonb) should be IMMUTABLE + ok 10 - Function public.null_count(jsonb) should return integer + ok 11 - Function public.null_count(jsonb) should not be strict + ok 12 - Function public.null_count(jsonb) should be IMMUTABLE ok 13 - ensure not_null_count({anyarray}) is not in search_path - ok 14 - Function schema_to_load_count_nulls.not_null_count(anyarray) should return integer - ok 15 - Function schema_to_load_count_nulls.not_null_count(anyarray) should not be strict - ok 16 - Function schema_to_load_count_nulls.not_null_count(anyarray) should be IMMUTABLE + ok 14 - Function public.not_null_count(anyarray) should return integer + ok 15 - Function public.not_null_count(anyarray) should not be strict + ok 16 - Function public.not_null_count(anyarray) should be IMMUTABLE ok 17 - ensure not_null_count({json}) is not in search_path - ok 18 - Function schema_to_load_count_nulls.not_null_count(json) should return integer - ok 19 - Function schema_to_load_count_nulls.not_null_count(json) should not be strict - ok 20 - Function schema_to_load_count_nulls.not_null_count(json) should be IMMUTABLE + ok 18 - Function public.not_null_count(json) should return integer + ok 19 - Function public.not_null_count(json) should not be strict + ok 20 - Function public.not_null_count(json) should be IMMUTABLE ok 21 - ensure not_null_count({jsonb}) is not in search_path - ok 22 - Function schema_to_load_count_nulls.not_null_count(jsonb) should return integer - ok 23 - Function schema_to_load_count_nulls.not_null_count(jsonb) should not be strict - ok 24 - Function schema_to_load_count_nulls.not_null_count(jsonb) should be IMMUTABLE - ok 25 - Function schema_to_load_count_nulls.null_count_trigger() should return trigger - ok 26 - Function schema_to_load_count_nulls.null_count_trigger() should not be strict - ok 27 - Function schema_to_load_count_nulls.null_count_trigger() should be IMMUTABLE - ok 28 - Function schema_to_load_count_nulls.not_null_count_trigger() should return trigger - ok 29 - Function schema_to_load_count_nulls.not_null_count_trigger() should not be strict - ok 30 - Function schema_to_load_count_nulls.not_null_count_trigger() should be IMMUTABLE + ok 22 - Function public.not_null_count(jsonb) should return integer + ok 23 - Function public.not_null_count(jsonb) should not be strict + ok 24 - Function public.not_null_count(jsonb) should be IMMUTABLE + ok 25 - Function public.null_count_trigger() should return trigger + ok 26 - Function public.null_count_trigger() should not be strict + ok 27 - Function public.null_count_trigger() should be IMMUTABLE + ok 28 - Function public.not_null_count_trigger() should return trigger + ok 29 - Function public.not_null_count_trigger() should not be strict + ok 30 - Function public.not_null_count_trigger() should be IMMUTABLE 1..30 ok 2 - _null_count_test.test__definition # Subtest: _null_count_test.test__functionality() - ok 1 - Test schema_to_load_count_nulls.null_count(a, b, c) - ok 2 - Test schema_to_load_count_nulls.null_count(json) - ok 3 - Test schema_to_load_count_nulls.null_count(jsonb) - ok 4 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger( NULL ) - ok 5 - Test schema_to_load_count_nulls.not_null_count_trigger( NULL ) + ok 1 - Test public.null_count(a, b, c) + ok 2 - Test public.null_count(json) + ok 3 - Test public.null_count(jsonb) + ok 4 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger( NULL ) + ok 5 - Test public.not_null_count_trigger( NULL ) ok 6 - DROP TRIGGER "test trigger" - ok 7 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger( ) - ok 8 - Test schema_to_load_count_nulls.not_null_count_trigger( ) + ok 7 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger( ) + ok 8 - Test public.not_null_count_trigger( ) ok 9 - DROP TRIGGER "test trigger" - ok 10 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger( NULL ) - ok 11 - Test schema_to_load_count_nulls.null_count_trigger( NULL ) + ok 10 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger( NULL ) + ok 11 - Test public.null_count_trigger( NULL ) ok 12 - DROP TRIGGER "test trigger" - ok 13 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger( ) - ok 14 - Test schema_to_load_count_nulls.null_count_trigger( ) + ok 13 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger( ) + ok 14 - Test public.null_count_trigger( ) ok 15 - DROP TRIGGER "test trigger" - ok 16 - CREATE TRIGGER "null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger(1, 'error_message') + ok 16 - CREATE TRIGGER "null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, 'error_message') ok 17 - Test "null_BEFORE_error_message" ok 18 - DROP TRIGGER "null_BEFORE_error_message" - ok 19 - CREATE TRIGGER "null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger(1, 'error_message') + ok 19 - CREATE TRIGGER "null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, 'error_message') ok 20 - Test "null_AFTER_error_message" ok 21 - DROP TRIGGER "null_AFTER_error_message" - ok 22 - CREATE TRIGGER "not_null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger(1, 'error_message') + ok 22 - CREATE TRIGGER "not_null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, 'error_message') ok 23 - Test "not_null_BEFORE_error_message" ok 24 - DROP TRIGGER "not_null_BEFORE_error_message" - ok 25 - CREATE TRIGGER "not_null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger(1, 'error_message') + ok 25 - CREATE TRIGGER "not_null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, 'error_message') ok 26 - Test "not_null_AFTER_error_message" ok 27 - DROP TRIGGER "not_null_AFTER_error_message" - ok 28 - CREATE TRIGGER "null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger(1, NULL) + ok 28 - CREATE TRIGGER "null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, NULL) ok 29 - Test "null_BEFORE_" ok 30 - DROP TRIGGER "null_BEFORE_" - ok 31 - CREATE TRIGGER "null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.null_count_trigger(1, NULL) + ok 31 - CREATE TRIGGER "null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, NULL) ok 32 - Test "null_AFTER_" ok 33 - DROP TRIGGER "null_AFTER_" - ok 34 - CREATE TRIGGER "not_null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger(1, NULL) + ok 34 - CREATE TRIGGER "not_null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, NULL) ok 35 - Test "not_null_BEFORE_" ok 36 - DROP TRIGGER "not_null_BEFORE_" - ok 37 - CREATE TRIGGER "not_null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE schema_to_load_count_nulls.not_null_count_trigger(1, NULL) + ok 37 - CREATE TRIGGER "not_null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, NULL) ok 38 - Test "not_null_AFTER_" ok 39 - DROP TRIGGER "not_null_AFTER_" 1..39 ok 3 - _null_count_test.test__functionality # Subtest: _null_count_test.test__shutdown__drop_all() ok 1 - ok 2 - 1..2 + 1..1 ok 4 - _null_count_test.test__shutdown__drop_all 1..4 diff --git a/test/expected/sanity.out b/test/expected/sanity.out deleted file mode 100644 index ae40eed..0000000 --- a/test/expected/sanity.out +++ /dev/null @@ -1,12 +0,0 @@ -\set ECHO none - null_count ------------- - 1 -(1 row) - - null_count ------------- - 1 -(1 row) - -TRANSACTION INTENTIONALLY LEFT OPEN diff --git a/test/expected/simple.out b/test/expected/simple.out deleted file mode 100644 index ea8bad2..0000000 --- a/test/expected/simple.out +++ /dev/null @@ -1,71 +0,0 @@ -\set ECHO none -# Subtest: _null_count_test.test__definition() - ok 1 - Function public.null_count(anyarray) should return integer - ok 2 - Function public.null_count(anyarray) should not be strict - ok 3 - Function public.null_count(anyarray) should be IMMUTABLE - ok 4 - Function public.null_count(json) should return integer - ok 5 - Function public.null_count(json) should not be strict - ok 6 - Function public.null_count(json) should be IMMUTABLE - ok 7 - Function public.null_count(jsonb) should return integer - ok 8 - Function public.null_count(jsonb) should not be strict - ok 9 - Function public.null_count(jsonb) should be IMMUTABLE - ok 10 - Function public.not_null_count(anyarray) should return integer - ok 11 - Function public.not_null_count(anyarray) should not be strict - ok 12 - Function public.not_null_count(anyarray) should be IMMUTABLE - ok 13 - Function public.not_null_count(json) should return integer - ok 14 - Function public.not_null_count(json) should not be strict - ok 15 - Function public.not_null_count(json) should be IMMUTABLE - ok 16 - Function public.not_null_count(jsonb) should return integer - ok 17 - Function public.not_null_count(jsonb) should not be strict - ok 18 - Function public.not_null_count(jsonb) should be IMMUTABLE - ok 19 - Function public.null_count_trigger() should return trigger - ok 20 - Function public.null_count_trigger() should not be strict - ok 21 - Function public.null_count_trigger() should be IMMUTABLE - ok 22 - Function public.not_null_count_trigger() should return trigger - ok 23 - Function public.not_null_count_trigger() should not be strict - ok 24 - Function public.not_null_count_trigger() should be IMMUTABLE - 1..24 -ok 1 - _null_count_test.test__definition -# Subtest: _null_count_test.test__functionality() - ok 1 - Test public.null_count(a, b, c) - ok 2 - Test public.null_count(json) - ok 3 - Test public.null_count(jsonb) - ok 4 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger( NULL ) - ok 5 - Test public.not_null_count_trigger( NULL ) - ok 6 - DROP TRIGGER "test trigger" - ok 7 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger( ) - ok 8 - Test public.not_null_count_trigger( ) - ok 9 - DROP TRIGGER "test trigger" - ok 10 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger( NULL ) - ok 11 - Test public.null_count_trigger( NULL ) - ok 12 - DROP TRIGGER "test trigger" - ok 13 - CREATE TRIGGER "test trigger" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger( ) - ok 14 - Test public.null_count_trigger( ) - ok 15 - DROP TRIGGER "test trigger" - ok 16 - CREATE TRIGGER "null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, 'error_message') - ok 17 - Test "null_BEFORE_error_message" - ok 18 - DROP TRIGGER "null_BEFORE_error_message" - ok 19 - CREATE TRIGGER "null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, 'error_message') - ok 20 - Test "null_AFTER_error_message" - ok 21 - DROP TRIGGER "null_AFTER_error_message" - ok 22 - CREATE TRIGGER "not_null_BEFORE_error_message" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, 'error_message') - ok 23 - Test "not_null_BEFORE_error_message" - ok 24 - DROP TRIGGER "not_null_BEFORE_error_message" - ok 25 - CREATE TRIGGER "not_null_AFTER_error_message" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, 'error_message') - ok 26 - Test "not_null_AFTER_error_message" - ok 27 - DROP TRIGGER "not_null_AFTER_error_message" - ok 28 - CREATE TRIGGER "null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, NULL) - ok 29 - Test "null_BEFORE_" - ok 30 - DROP TRIGGER "null_BEFORE_" - ok 31 - CREATE TRIGGER "null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.null_count_trigger(1, NULL) - ok 32 - Test "null_AFTER_" - ok 33 - DROP TRIGGER "null_AFTER_" - ok 34 - CREATE TRIGGER "not_null_BEFORE_" BEFORE INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, NULL) - ok 35 - Test "not_null_BEFORE_" - ok 36 - DROP TRIGGER "not_null_BEFORE_" - ok 37 - CREATE TRIGGER "not_null_AFTER_" AFTER INSERT ON test_data FOR EACH ROW EXECUTE PROCEDURE public.not_null_count_trigger(1, NULL) - ok 38 - Test "not_null_AFTER_" - ok 39 - DROP TRIGGER "not_null_AFTER_" - 1..39 -ok 2 - _null_count_test.test__functionality -1..2 diff --git a/test/install/.gitignore b/test/install/.gitignore new file mode 100644 index 0000000..0393122 --- /dev/null +++ b/test/install/.gitignore @@ -0,0 +1,2 @@ +load.out +install.out.diff diff --git a/test/install/load.sql b/test/install/load.sql new file mode 100644 index 0000000..d598560 --- /dev/null +++ b/test/install/load.sql @@ -0,0 +1,12 @@ +-- Installs count_nulls once, committed, before the main test/sql/ schedule +-- runs (see pgxntool/README.asc's "test/install" and "Update & Upgrade (U&U) +-- Testing" sections) - so every test/sql/*.sql file finds it already +-- present instead of each one installing (and dropping) it per-test. +-- +-- This file's own output is NOT tracked as expected output (see +-- test/install/.gitignore): pg_regress resolves both its expected and +-- actual-result paths to test/install/load.out, so the diff is always +-- self-identical regardless of content. Correctness here comes from this +-- file failing loudly (aborting the session) if something's wrong, not +-- from a textual comparison - matching cat_tools' test/install/load.sql. +CREATE EXTENSION count_nulls; diff --git a/test/sql/extension_tests.sql b/test/sql/extension_tests.sql index ba88447..056b435 100644 --- a/test/sql/extension_tests.sql +++ b/test/sql/extension_tests.sql @@ -1,27 +1,25 @@ \set ECHO none -\set schema schema_to_load_count_nulls \i test/load.sql -\set schema public \i test/core/functions.sql ---CREATE OR REPLACE FUNCTION ncs() RETURNS name LANGUAGE sql IMMUTABLE AS $$SELECT 'schema_to_load_count_nulls'::name$$; - +/* + * count_nulls is installed by test/install/load.sql with no schema + * targeting - it lands wherever the session's own search_path resolves at + * CREATE EXTENSION time (in-suite, that's pgTap's own schema, put on + * search_path first by test/pgxntool/tap_setup.sql). This just proves + * ncs() actually resolves to something real; a future TEST_SCHEMA switch + * (see pgxntool/README.asc's U&U section) would let this assert an exact, + * known location instead. + */ CREATE FUNCTION _null_count_test.test__check_ncs () RETURNS SETOF text LANGUAGE plpgsql AS $body$ -DECLARE - s CONSTANT name = 'schema_to_load_count_nulls'; BEGIN - RETURN NEXT is( + RETURN NEXT isnt( ncs() - , s - ); - RETURN NEXT is( - current_schemas(true) @> array[s] - , false - --, format('schema %I should not be in search path (%s)', s, current_schemas(true)) - , format('schema %I should not be in search path', s) --, current_schemas(true)) + , NULL + , 'ncs() resolves to the schema count_nulls actually installed in' ); END $body$; @@ -32,10 +30,6 @@ BEGIN RETURN NEXT lives_ok( $$DROP EXTENSION count_nulls$$ ); - - RETURN NEXT lives_ok( - $$DROP SCHEMA schema_to_load_count_nulls$$ - ); END $body$; diff --git a/test/sql/sanity.sql b/test/sql/sanity.sql deleted file mode 100644 index 6c9ea2f..0000000 --- a/test/sql/sanity.sql +++ /dev/null @@ -1,11 +0,0 @@ -\set ECHO none -\set VERBOSITY verbose - -BEGIN; -CREATE EXTENSION count_nulls; - --- Remember that JSON only accepts 'null' -SELECT null_count('{"a": null}'::jsonb); -SELECT null_count(1,NULL); - -\echo TRANSACTION INTENTIONALLY LEFT OPEN diff --git a/test/sql/simple.sql b/test/sql/simple.sql deleted file mode 100644 index 9406729..0000000 --- a/test/sql/simple.sql +++ /dev/null @@ -1,11 +0,0 @@ -\set ECHO none - -\set schema public - -\i test/load.sql - -\i test/core/functions.sql - ---SET client_min_messages = debug; - -SELECT * FROM runtests( '_null_count_test'::name );