diff --git a/contrib/pg_tde/t/001_basic.pl b/contrib/pg_tde/t/001_basic.pl index 7e5c1065e35..336615047ec 100644 --- a/contrib/pg_tde/t/001_basic.pl +++ b/contrib/pg_tde/t/001_basic.pl @@ -50,11 +50,10 @@ PGTDE::psql($node, 'postgres', 'SELECT * FROM test_enc ORDER BY id ASC;'); my $tablefile = $node->data_dir . '/' . $node->safe_psql('postgres', "SELECT pg_relation_filepath('test_enc');"); -my $strings = 'TABLEFILE FOUND: '; -$strings .= `(ls $tablefile >/dev/null && echo yes) || echo no`; -PGTDE::append_to_result_file($strings); +PGTDE::append_to_result_file( + 'TABLEFILE FOUND: ' . (-f $tablefile ? 'yes' : 'no')); -$strings = 'CONTAINS FOO (should be empty): '; +my $strings = 'CONTAINS FOO (should be empty): '; $strings .= `strings $tablefile | grep foo`; PGTDE::append_to_result_file($strings); diff --git a/contrib/pg_tde/t/007_tde_heap.pl b/contrib/pg_tde/t/007_tde_heap.pl index 2d0daca33e4..646de2b929f 100644 --- a/contrib/pg_tde/t/007_tde_heap.pl +++ b/contrib/pg_tde/t/007_tde_heap.pl @@ -108,15 +108,17 @@ sub verify_table PGTDE::psql($node, 'postgres', 'SELECT * FROM ' . $table . ' ORDER BY id ASC;'); - my $strings = 'TABLEFILE FOR ' . $table . ' FOUND: '; - $strings .= `(ls $tablefile >/dev/null && echo -n yes) || echo -n no`; - PGTDE::append_to_result_file($strings); + PGTDE::append_to_result_file('TABLEFILE FOR ' + . $table + . ' FOUND: ' + . (-f $tablefile ? 'yes' : 'no')); - $strings = 'CONTAINS FOO (should be empty): '; + my $strings = 'CONTAINS FOO (should be empty): '; $strings .= `strings $tablefile | grep foo`; PGTDE::append_to_result_file($strings); } +# Verify that we can't see the data in the files verify_table('test_enc1'); verify_table('test_enc2'); verify_table('test_enc3'); diff --git a/contrib/pg_tde/t/expected/001_basic.out b/contrib/pg_tde/t/expected/001_basic.out index 9902db68772..0b5daa413aa 100644 --- a/contrib/pg_tde/t/expected/001_basic.out +++ b/contrib/pg_tde/t/expected/001_basic.out @@ -38,7 +38,6 @@ SELECT * FROM test_enc ORDER BY id ASC; (2 rows) TABLEFILE FOUND: yes - CONTAINS FOO (should be empty): DROP TABLE test_enc; DROP EXTENSION pg_tde;