Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions test/expected/install.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
\set ECHO none
ok 1 - drop extension test_factory_pgtap
ok 2 - drop extension test_factory
ok 3 - Extension test_factory should not exist
ok 4 - Extension test_factory_pgtap should not exist
ok 5 - create extension
ok 6 - Function tf.tap(text, text) should exist
ok 7 - clean-up test_factory_pgtap
ok 8 - clean-up test_factory
30 changes: 30 additions & 0 deletions test/sql/install.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
\set ECHO none
\i test/helpers/setup.sql

SET client_min_messages = WARNING;

/*
* DO NOT use CASCADE here; we want this to fail if there's anything installed
* that depends on it.
*/
SELECT lives_ok($$DROP EXTENSION IF EXISTS test_factory_pgtap$$, 'drop extension test_factory_pgtap');
SELECT lives_ok($$DROP EXTENSION IF EXISTS test_factory$$, 'drop extension test_factory');

SELECT hasnt_extension( 'test_factory' );
SELECT hasnt_extension( 'test_factory_pgtap' );

SELECT lives_ok($$CREATE EXTENSION test_factory_pgtap CASCADE$$, 'create extension');
COMMIT;

SELECT has_function('tf', 'tap', array['text','text']);

-- Cleanup
SELECT lives_ok($$DROP EXTENSION IF EXISTS test_factory_pgtap$$, 'clean-up test_factory_pgtap');
SELECT lives_ok($$DROP EXTENSION IF EXISTS test_factory$$, 'clean-up test_factory');

/*
* Arguably we should cleanup pgtap and the tap schema...
*/

-- vi: expandtab ts=2 sw=2