Skip to content

Commit cdd6aa1

Browse files
committed
PG-1870 Enable table encryption by default in TAP
This enables table encryption by default in TAP tests when TDE_MODE=1. Use TDE_MODE_SMGR=0 to turn off table encryption when running with pg_tde loaded. Two variant expectation files had to be added since these tests lists all available table access methods.
1 parent fdb5223 commit cdd6aa1

File tree

19 files changed

+7414
-1
lines changed

19 files changed

+7414
-1
lines changed

contrib/amcheck/t/001_verify_heapam.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
use Test::More;
1111

12+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
13+
{
14+
plan skip_all => "hacks relation files directly for scaffolding";
15+
}
16+
1217
my ($node, $result);
1318

1419
#

src/bin/pg_amcheck/t/003_check.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@
99

1010
use Test::More;
1111

12+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
13+
{
14+
plan skip_all => "hacks relation files directly for scaffolding";
15+
}
16+
1217
my ($node, $port, %corrupt_page, %remove_relation);
1318

1419
# Returns the filesystem path for the named relation.

src/bin/pg_amcheck/t/005_opclass_damage.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
use PostgreSQL::Test::Utils;
1111
use Test::More;
1212

13+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
14+
{
15+
plan skip_all => 'investigate why this fails';
16+
}
17+
1318
my $node = PostgreSQL::Test::Cluster->new('test');
1419
$node->init;
1520
$node->start;

src/bin/pg_basebackup/t/010_pg_basebackup.pl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
"pg_basebackup without -E from server with encrypted WAL produces broken backups";
1717
}
1818

19+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
20+
{
21+
plan skip_all =>
22+
'uses corrupt_page_checksum to directly hack relation files';
23+
}
24+
1925
program_help_ok('pg_basebackup');
2026
program_version_ok('pg_basebackup');
2127
program_options_handling_ok('pg_basebackup');
@@ -370,7 +376,7 @@
370376
# drives.
371377
rmdir("$pgdata/pg_replslot")
372378
or BAIL_OUT "could not remove $pgdata/pg_replslot";
373-
mkdir("$sys_tempdir/pg_replslot"); # if this fails the symlink will fail
379+
mkdir("$sys_tempdir/pg_replslot"); # if this fails the symlink will fail
374380
dir_symlink("$sys_tempdir/pg_replslot", "$pgdata/pg_replslot")
375381
or BAIL_OUT "could not symlink to $pgdata/pg_replslot";
376382

src/bin/pg_checksums/t/002_actions.pl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
use Test::More;
1414

15+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
16+
{
17+
plan skip_all =>
18+
'uses corrupt_page_checksum to directly hack relation files';
19+
}
1520

1621
# Utility routine to create and check a table with corrupted checksums
1722
# on a wanted tablespace. Note that this stops and starts the node

src/bin/pg_dump/t/004_pg_dump_parallel.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
use PostgreSQL::Test::Utils;
99
use Test::More;
1010

11+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
12+
{
13+
plan skip_all =>
14+
'pg_restore fail to restore _pg_tde schema on cluster which already has it';
15+
}
16+
1117
my $dbname1 = 'regression_src';
1218
my $dbname2 = 'regression_dest1';
1319
my $dbname3 = 'regression_dest2';

src/bin/pg_dump/t/010_dump_connstr.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
use PostgreSQL::Test::Utils;
99
use Test::More;
1010

11+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
12+
{
13+
plan skip_all =>
14+
'pg_restore fail to restore _pg_tde schema on cluster which already has it';
15+
}
16+
1117
if ($PostgreSQL::Test::Utils::is_msys2)
1218
{
1319
plan skip_all => 'High bit name tests fail on Msys2';

src/bin/pg_upgrade/t/002_pg_upgrade.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
use PostgreSQL::Test::AdjustUpgrade;
1616
use Test::More;
1717

18+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
19+
{
20+
plan skip_all =>
21+
'pg_restore fail to restore _pg_tde schema on cluster which already has it';
22+
}
23+
1824
# Can be changed to test the other modes.
1925
my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';
2026

src/bin/pg_upgrade/t/003_logical_slots.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
use PostgreSQL::Test::Utils;
1212
use Test::More;
1313

14+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
15+
{
16+
plan skip_all =>
17+
'pg_restore fail to restore _pg_tde schema on cluster which already has it';
18+
}
19+
1420
# Can be changed to test the other modes
1521
my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';
1622

src/bin/pg_upgrade/t/004_subscription.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
use PostgreSQL::Test::Utils;
1313
use Test::More;
1414

15+
if ($ENV{TDE_MODE_SMGR} and not $ENV{TDE_MODE_NOSKIP})
16+
{
17+
plan skip_all =>
18+
'pg_restore fail to restore _pg_tde schema on cluster which already has it';
19+
}
20+
1521
# Can be changed to test the other modes.
1622
my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';
1723

0 commit comments

Comments
 (0)