Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix failing tablespace tests #323

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 8 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: echo "$PWD/bin" >> $GITHUB_PATH

- name: Create testts directory
run: sudo -u postgres mkdir /tmp/testts
run: sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts

- name: Create testts tablespace
run: sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
Expand All @@ -44,3 +44,10 @@ jobs:
- name: Show regression.diffs
if: ${{ failure() }}
run: cat regress/regression.diffs

- name: Remove tests tablespace
run: sudo -u postgres psql -c "DROP TABLESPACE testts"

- name: Remove testts directory
run: sudo -u postgres rm -rf /tmp/testts

6 changes: 6 additions & 0 deletions regress/expected/tablespace.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
spcname
---------
Expand Down Expand Up @@ -245,3 +249,5 @@ ORDER BY relname;
--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey
ERROR: cannot specify --index (-i) and --table (-t)
-- cleanup
DROP TABLE testts1;
6 changes: 6 additions & 0 deletions regress/expected/tablespace_1.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
spcname
---------
Expand Down Expand Up @@ -245,3 +249,5 @@ ORDER BY relname;
--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey
ERROR: cannot specify --index (-i) and --table (-t)
-- cleanup
DROP TABLE testts1;
6 changes: 6 additions & 0 deletions regress/expected/tablespace_2.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
spcname
---------
Expand Down Expand Up @@ -245,3 +249,5 @@ ORDER BY relname;
--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey
ERROR: cannot specify --index (-i) and --table (-t)
-- cleanup
DROP TABLE testts1;
6 changes: 6 additions & 0 deletions regress/expected/tablespace_3.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
spcname
---------
Expand Down Expand Up @@ -245,3 +249,5 @@ ORDER BY relname;
--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey
ERROR: cannot specify --index (-i) and --table (-t)
-- cleanup
DROP TABLE testts1;
6 changes: 6 additions & 0 deletions regress/expected/tablespace_4.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--
SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
spcname
---------
Expand Down Expand Up @@ -245,3 +249,5 @@ ORDER BY relname;
--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey
ERROR: cannot specify --index (-i) and --table (-t)
-- cleanup
DROP TABLE testts1;
8 changes: 8 additions & 0 deletions regress/sql/tablespace.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ SET client_min_messages = warning;
--
-- Note: in order to pass this test you must create a tablespace called 'testts'
--
-- Test tablespace creation example:
-- $ sudo -u postgres mkdir -p /tmp/testts && chmod 0700 /tmp/testts
-- $ sudo -u postgres psql -c "CREATE TABLESPACE testts LOCATION '/tmp/testts'"
--

SELECT spcname FROM pg_tablespace WHERE spcname = 'testts';
-- If the query above failed you must create the 'testts' tablespace;
Expand Down Expand Up @@ -147,3 +151,7 @@ ORDER BY relname;

--using --indexes-only and --index option together
\! pg_repack --dbname=contrib_regression --table=testts1 --only-indexes --index=testts1_pkey

-- cleanup
DROP TABLE testts1;