summaryrefslogtreecommitdiff
path: root/src/test/modules/test_misc/t/002_tablespace.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/modules/test_misc/t/002_tablespace.pl')
-rw-r--r--src/test/modules/test_misc/t/002_tablespace.pl34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/test/modules/test_misc/t/002_tablespace.pl b/src/test/modules/test_misc/t/002_tablespace.pl
index 04e54394c1..95cd2b7b65 100644
--- a/src/test/modules/test_misc/t/002_tablespace.pl
+++ b/src/test/modules/test_misc/t/002_tablespace.pl
@@ -13,9 +13,9 @@ $node->init;
$node->start;
# Create a couple of directories to use as tablespaces.
-my $basedir = $node->basedir();
+my $basedir = $node->basedir();
my $TS1_LOCATION = "$basedir/ts1";
-$TS1_LOCATION =~ s/\/\.\//\//g; # collapse foo/./bar to foo/bar
+$TS1_LOCATION =~ s/\/\.\//\//g; # collapse foo/./bar to foo/bar
mkdir($TS1_LOCATION);
my $TS2_LOCATION = "$basedir/ts2";
$TS2_LOCATION =~ s/\/\.\//\//g;
@@ -34,13 +34,11 @@ $result = $node->psql('postgres',
ok($result != 0, 'clobber tablespace with absolute path');
# Create table in it
-$result = $node->psql('postgres',
- "CREATE TABLE t () TABLESPACE regress_ts1");
+$result = $node->psql('postgres', "CREATE TABLE t () TABLESPACE regress_ts1");
ok($result == 0, 'create table in tablespace with absolute path');
# Can't drop a tablespace that still has a table in it
-$result = $node->psql('postgres',
- "DROP TABLESPACE regress_ts1");
+$result = $node->psql('postgres', "DROP TABLESPACE regress_ts1");
ok($result != 0, 'drop tablespace with absolute path');
# Drop the table
@@ -60,32 +58,28 @@ $result = $node->psql('postgres',
"CREATE TABLESPACE regress_ts2 LOCATION '$TS2_LOCATION'");
ok($result == 0, 'create tablespace 2 with absolute path');
$result = $node->psql('postgres',
- "SET allow_in_place_tablespaces=on; CREATE TABLESPACE regress_ts3 LOCATION ''");
+ "SET allow_in_place_tablespaces=on; CREATE TABLESPACE regress_ts3 LOCATION ''"
+);
ok($result == 0, 'create tablespace 3 with in-place directory');
$result = $node->psql('postgres',
- "SET allow_in_place_tablespaces=on; CREATE TABLESPACE regress_ts4 LOCATION ''");
+ "SET allow_in_place_tablespaces=on; CREATE TABLESPACE regress_ts4 LOCATION ''"
+);
ok($result == 0, 'create tablespace 4 with in-place directory');
# Create a table and test moving between absolute and in-place tablespaces
-$result = $node->psql('postgres',
- "CREATE TABLE t () TABLESPACE regress_ts1");
+$result = $node->psql('postgres', "CREATE TABLE t () TABLESPACE regress_ts1");
ok($result == 0, 'create table in tablespace 1');
-$result = $node->psql('postgres',
- "ALTER TABLE t SET tablespace regress_ts2");
+$result = $node->psql('postgres', "ALTER TABLE t SET tablespace regress_ts2");
ok($result == 0, 'move table abs->abs');
-$result = $node->psql('postgres',
- "ALTER TABLE t SET tablespace regress_ts3");
+$result = $node->psql('postgres', "ALTER TABLE t SET tablespace regress_ts3");
ok($result == 0, 'move table abs->in-place');
-$result = $node->psql('postgres',
- "ALTER TABLE t SET tablespace regress_ts4");
+$result = $node->psql('postgres', "ALTER TABLE t SET tablespace regress_ts4");
ok($result == 0, 'move table in-place->in-place');
-$result = $node->psql('postgres',
- "ALTER TABLE t SET tablespace regress_ts1");
+$result = $node->psql('postgres', "ALTER TABLE t SET tablespace regress_ts1");
ok($result == 0, 'move table in-place->abs');
# Drop everything
-$result = $node->psql('postgres',
- "DROP TABLE t");
+$result = $node->psql('postgres', "DROP TABLE t");
ok($result == 0, 'create table in tablespace 1');
$result = $node->psql('postgres', "DROP TABLESPACE regress_ts1");
ok($result == 0, 'drop tablespace 1');