Commit 32a7000
Add update+upgrade (U&U) test infrastructure: 0.1.0->stable update script,
test/install/load.sql three-mode loader, dependency-guard anchor, and a
permanent schema-qualification pgTAP assertion
Implements advanced-extension-testing.md checklist items 1-6 on top of
PR #17 (reconcile-object-functions):
- PGXNTOOL_ENABLE_TEST_INSTALL / PGXNTOOL_ENABLE_VERIFY_RESULTS set
explicitly; TEST_LOAD_SOURCE (fresh/update/existing) + TEST_UPDATE_FROM/TO
make vars, parse-time validated, propagated as placeholder GUCs via
PGOPTIONS; `make test-update` wrapper.
- test/install/load.sql: single committed-once installer for the extension,
covering all three load modes, including a drop-first reset (with
pg_temp.drop_role() for the extension's own global roles) and an
existing-mode presence/version assertion.
- sql/object_reference--0.1.0--stable.sql: hand-authored update script (there
was previously no update path at all from the only real historical release
to current). Recreates every function/view that changed via the same
private-helper-schema bootstrap/teardown convention the fresh install uses,
so the update path is verified byte-for-byte structurally identical to a
fresh install (function bodies, comments, ACLs, table/view columns).
- Makefile: DATA += sql/object_reference--0.1.0.sql (pgxntool#48 workaround,
needed for CREATE EXTENSION ... VERSION '0.1.0' to work at all); a
conditional count_nulls install step for the update-mode floor only (0.1.0's
own install script still needs it, even though current object_reference no
longer requires it).
- test/finish.sql: one permanent pgTAP assertion (modeled on
pg_count_nulls'/extension_tools' own schema-qualification checks) proving
object_reference/_object_reference are never resolved via search_path.
- Moved the pre-existing raw-source-load sanity check (test/sql/zzz_build.sql)
to test/build/, pgxntool's own test-build feature: it needs a schema-free
database to create `object_reference` manually in, which the committed-once
installer above no longer provides in the shared main-suite database.
Dependency-guard anchor for a future existing-mode CI job: a view typed on
_object_reference.object's row type (object_reference-owned, never dropped or
redefined by the update script) blocks a non-CASCADE DROP EXTENSION; manually
proven to block the drop (and to keep blocking it after the update path) as
part of this PR's own verification, not committed as CI machinery yet.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 105ee2d commit 32a7000
20 files changed
Lines changed: 1088 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
1 | 60 | | |
2 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
3 | 72 | | |
4 | 73 | | |
5 | 74 | | |
6 | 75 | | |
7 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
8 | 94 | | |
9 | 95 | | |
10 | 96 | | |
11 | 97 | | |
12 | 98 | | |
13 | 99 | | |
14 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
15 | 105 | | |
16 | 106 | | |
17 | 107 | | |
| |||
0 commit comments