Skip to content

Run postgresql TAP suite with WAL encryption enabled #535

New issue

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

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

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: TDE_REL_17_STABLE
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion ci_scripts/env.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

export PERCONA_SERVER_VERSION=17.5.2
export PERCONA_SERVER_VERSION=17.5.3
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -2856,7 +2856,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF


PG_PERCONAVERSION=2
PG_PERCONAVERSION=3

cat >>confdefs.h <<_ACEOF
#define PG_PERCONAVERSION "$PG_PERCONAVERSION"
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major versio
AC_DEFINE_UNQUOTED(PG_MAJORVERSION_NUM, $PG_MAJORVERSION, [PostgreSQL major version number])
AC_DEFINE_UNQUOTED(PG_MINORVERSION_NUM, $PG_MINORVERSION, [PostgreSQL minor version number])

[PG_PERCONAVERSION=2]
[PG_PERCONAVERSION=3]
AC_DEFINE_UNQUOTED(PG_PERCONAVERSION, "$PG_PERCONAVERSION", [PostgreSQL Percona version as a string])

PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_tde/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PGFILEDESC = "pg_tde access method"
MODULE_big = pg_tde
EXTENSION = pg_tde
DATA = pg_tde--1.0.sql
DATA = pg_tde--1.0--2.0.sql pg_tde--1.0.sql

# Since meson supports skipping test suites this is a make only feature
ifndef TDE_MODE
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_tde/expected/version.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CREATE EXTENSION pg_tde;
SELECT pg_tde_version();
pg_tde_version
----------------
pg_tde 1.0.0
pg_tde 2.0.0
(1 row)

DROP EXTENSION pg_tde;
1 change: 1 addition & 0 deletions contrib/pg_tde/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ endif
install_data(
'pg_tde.control',
'pg_tde--1.0.sql',
'pg_tde--1.0--2.0.sql',
kwargs: contrib_data_args,
)

Expand Down
4 changes: 4 additions & 0 deletions contrib/pg_tde/pg_tde--1.0--2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "ALTER EXTENSION pg_tde UPDATE TO '2.0'" to load this file. \quit

-- This file is a dummy, because no SQL changed between 1.0 and 2.0
2 changes: 1 addition & 1 deletion contrib/pg_tde/pg_tde.control
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
comment = 'pg_tde access method'
default_version = '1.0'
default_version = '2.0'
module_pathname = '$libdir/pg_tde'
relocatable = false
2 changes: 1 addition & 1 deletion contrib/pg_tde/src/include/pg_tde.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define PG_TDE_H

#define PG_TDE_NAME "pg_tde"
#define PG_TDE_VERSION "1.0.0"
#define PG_TDE_VERSION "2.0.0"
#define PG_TDE_VERSION_STRING PG_TDE_NAME " " PG_TDE_VERSION

#define PG_TDE_DATA_DIR "pg_tde"
Expand Down
2 changes: 1 addition & 1 deletion contrib/pg_tde/t/expected/basic.out
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CREATE EXTENSION pg_tde;
SELECT extname, extversion FROM pg_extension WHERE extname = 'pg_tde';
extname | extversion
---------+------------
pg_tde | 1.0
pg_tde | 2.0
(1 row)

CREATE TABLE test_enc (id SERIAL, k INTEGER, PRIMARY KEY (id)) USING tde_heap;
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ endif
pg_version_major = pg_version_arr[0].to_int()
pg_version_minor = pg_version_arr[1].to_int()
pg_version_num = (pg_version_major * 10000) + pg_version_minor
pg_percona_ver = '2'
pg_percona_ver = '3'

pg_url = 'https://www.postgresql.org/'

Expand Down
5 changes: 5 additions & 0 deletions src/bin/pg_basebackup/t/010_pg_basebackup.pl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
use PostgreSQL::Test::Utils;
use Test::More;

if (defined($ENV{TDE_MODE}))
{
plan skip_all => "Slightly edited version of this test avaiable in pg_tde suite";
}

Comment on lines +13 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test in pg_tde suite do only sanity checks for the -E flag, hence it doesn't overlap with this test at all.

program_help_ok('pg_basebackup');
program_version_ok('pg_basebackup');
program_options_handling_ok('pg_basebackup');
Expand Down
5 changes: 5 additions & 0 deletions src/bin/pg_rewind/t/001_basic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

use RewindTest;

if (defined($ENV{TDE_MODE}))
{
plan skip_all => "Slightly edited version of this test avaiable in pg_tde suite";
}

sub run_test
{
my $test_mode = shift;
Expand Down
5 changes: 5 additions & 0 deletions src/bin/pg_rewind/t/002_databases.pl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

use RewindTest;

if (defined($ENV{TDE_MODE}))
{
plan skip_all => "Something weird going on with file modes";
}

sub run_test
{
my $test_mode = shift;
Expand Down
5 changes: 0 additions & 5 deletions src/bin/pg_upgrade/t/002_pg_upgrade.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@
use PostgreSQL::Test::AdjustUpgrade;
use Test::More;

if (defined($ENV{TDE_MODE}))
{
plan skip_all => "Running with TDE doesn't support special server starts yet";
}

# Can be changed to test the other modes.
my $mode = $ENV{PG_TEST_PG_UPGRADE_MODE} || '--copy';

Expand Down
2 changes: 1 addition & 1 deletion src/test/modules/test_misc/t/008_percona_server_version.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# To make this testcase work, PERCONA_SERVER_VERSION variable should be available in environment.
# If you are using ci_scripts it is already declated in ci_scripts/env.sh
# If you are using command line make for regression then export like:
# export PERCONA_SERVER_VERSION=17.5.2
# export PERCONA_SERVER_VERSION=17.5.3

if (!defined($ENV{PERCONA_SERVER_VERSION}))
{
Expand Down
6 changes: 6 additions & 0 deletions src/test/perl/PostgreSQL/Test/Cluster.pm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ use Text::ParseWords qw(shellwords);
use Time::HiRes qw(usleep);
use Scalar::Util qw(blessed);

use if defined($ENV{TDE_MODE}), 'PostgreSQL::Test::TdeCluster';

our ($use_tcp, $test_localhost, $test_pghost, $last_host_assigned,
$last_port_assigned, @all_nodes, $died, $portdir);

Expand Down Expand Up @@ -1527,6 +1529,10 @@ sub new
}
}

if (defined($ENV{TDE_MODE})) {
bless $node, 'PostgreSQL::Test::TdeCluster';
}

# Add node to list of nodes
push(@all_nodes, $node);

Expand Down
Loading
Loading