File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ PGFILEDESC = "pgAudit - An audit logging extension for PostgreSQL"
99
1010REGRESS = pgaudit
1111REGRESS_OPTS = --temp-config=$(top_srcdir ) /contrib/pgaudit/pgaudit.conf
12+ TAP_TESTS = 1
1213
1314ifdef USE_PGXS
1415PG_CONFIG = pg_config
Original file line number Diff line number Diff line change 1+ use strict;
2+ use warnings FATAL => ' all' ;
3+ use Test::More;
4+
5+ use DBI;
6+ use PostgreSQL::Test::Cluster;
7+
8+ # Initialize and start cluster
9+ my $node = PostgreSQL::Test::Cluster-> new(' main' );
10+ $node -> init;
11+ $node -> append_conf(' postgresql.conf' , " shared_preload_libraries = 'pgaudit'" );
12+ $node -> start;
13+
14+ # Connect to cluster
15+ my $db = DBI-> connect (
16+ " dbi:Pg:dbname=postgres;port=" . $node -> port() . " ;host=" . $node -> host(),
17+ " postgres" , undef ,
18+ {AutoCommit => 0, RaiseError => 1, PrintError => 1});
19+
20+ # !!! REPLACE WITH REAL TESTS
21+ is($db -> do(" select 1" ), 1);
22+
23+ # Disconnect and stop cluster
24+ undef ($db );
25+ $node -> stop;
26+
27+ done_testing();
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ FROM ubuntu:jammy
33# Install packages
44RUN apt-get update
55RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo wget gnupg tzdata locales lsb-release apt-utils make gcc libssl-dev \
6- libkrb5-dev
6+ libkrb5-dev libdbd-pg-perl
77
88# Create postgres user/group with specific IDs
99ARG UID=1000
Original file line number Diff line number Diff line change 11FROM rockylinux/rockylinux:8
22
33# Install packages
4- RUN dnf install -y sudo make gcc llvm-toolset openssl-devel redhat-rpm-config
4+ RUN dnf install -y sudo make gcc llvm-toolset openssl-devel redhat-rpm-config perl perl-DBD-Pg
55
66# Install and enable EPEL repository
77RUN dnf -y install epel-release
You can’t perform that action at this time.
0 commit comments