diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index 812c5a1e..116b58fe 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -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'" @@ -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 + diff --git a/regress/expected/tablespace.out b/regress/expected/tablespace.out index 11c7e106..fafe03fa 100644 --- a/regress/expected/tablespace.out +++ b/regress/expected/tablespace.out @@ -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 --------- @@ -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; diff --git a/regress/expected/tablespace_1.out b/regress/expected/tablespace_1.out index 4ef2d04a..54b1a41d 100644 --- a/regress/expected/tablespace_1.out +++ b/regress/expected/tablespace_1.out @@ -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 --------- @@ -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; diff --git a/regress/expected/tablespace_2.out b/regress/expected/tablespace_2.out index 521f82a6..f2296aa5 100644 --- a/regress/expected/tablespace_2.out +++ b/regress/expected/tablespace_2.out @@ -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 --------- @@ -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; diff --git a/regress/expected/tablespace_3.out b/regress/expected/tablespace_3.out index a3d023c6..0b7ee95e 100644 --- a/regress/expected/tablespace_3.out +++ b/regress/expected/tablespace_3.out @@ -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 --------- @@ -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; diff --git a/regress/expected/tablespace_4.out b/regress/expected/tablespace_4.out index cc6495f8..876b6d89 100644 --- a/regress/expected/tablespace_4.out +++ b/regress/expected/tablespace_4.out @@ -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 --------- @@ -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; diff --git a/regress/sql/tablespace.sql b/regress/sql/tablespace.sql index 78790d87..e3758c1e 100644 --- a/regress/sql/tablespace.sql +++ b/regress/sql/tablespace.sql @@ -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; @@ -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; +