mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
Add basic regression test from downstream
Per GitHub #282 Ref: https://anonscm.debian.org/cgit/pkg-postgresql/repmgr.git/tree/debian/patches/regress.patch
This commit is contained in:
1
Makefile
1
Makefile
@@ -8,6 +8,7 @@ repmgrd_OBJS = dbutils.o config.o repmgrd.o log.o strutil.o
|
|||||||
repmgr_OBJS = dbutils.o check_dir.o config.o repmgr.o log.o strutil.o dirmod.o compat.o
|
repmgr_OBJS = dbutils.o check_dir.o config.o repmgr.o log.o strutil.o dirmod.o compat.o
|
||||||
|
|
||||||
DATA = repmgr.sql uninstall_repmgr.sql
|
DATA = repmgr.sql uninstall_repmgr.sql
|
||||||
|
REGRESS = repmgr_funcs repmgr_test
|
||||||
|
|
||||||
PG_CPPFLAGS = -I$(libpq_srcdir)
|
PG_CPPFLAGS = -I$(libpq_srcdir)
|
||||||
PG_LIBS = $(libpq_pgport)
|
PG_LIBS = $(libpq_pgport)
|
||||||
|
|||||||
18
expected/repmgr_funcs.out
Normal file
18
expected/repmgr_funcs.out
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* repmgr_function.sql
|
||||||
|
* Copyright (c) 2ndQuadrant, 2010-2017
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
-- SET SEARCH_PATH TO 'repmgr';
|
||||||
|
CREATE FUNCTION repmgr_update_standby_location(text) RETURNS boolean
|
||||||
|
AS '$libdir/repmgr_funcs', 'repmgr_update_standby_location'
|
||||||
|
LANGUAGE C STRICT;
|
||||||
|
CREATE FUNCTION repmgr_get_last_standby_location() RETURNS text
|
||||||
|
AS '$libdir/repmgr_funcs', 'repmgr_get_last_standby_location'
|
||||||
|
LANGUAGE C STRICT;
|
||||||
|
CREATE FUNCTION repmgr_update_last_updated() RETURNS TIMESTAMP WITH TIME ZONE
|
||||||
|
AS '$libdir/repmgr_funcs', 'repmgr_update_last_updated'
|
||||||
|
LANGUAGE C STRICT;
|
||||||
|
CREATE FUNCTION repmgr_get_last_updated() RETURNS TIMESTAMP WITH TIME ZONE
|
||||||
|
AS '$libdir/repmgr_funcs', 'repmgr_get_last_updated'
|
||||||
|
LANGUAGE C STRICT;
|
||||||
24
expected/repmgr_test.out
Normal file
24
expected/repmgr_test.out
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
select * from repmgr_update_standby_location('');
|
||||||
|
repmgr_update_standby_location
|
||||||
|
--------------------------------
|
||||||
|
f
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select * from repmgr_get_last_standby_location();
|
||||||
|
repmgr_get_last_standby_location
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select * from repmgr_update_last_updated();
|
||||||
|
repmgr_update_last_updated
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
select * from repmgr_get_last_updated();
|
||||||
|
repmgr_get_last_updated
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
4
sql/repmgr_test.sql
Normal file
4
sql/repmgr_test.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
select * from repmgr_update_standby_location('');
|
||||||
|
select * from repmgr_get_last_standby_location();
|
||||||
|
select * from repmgr_update_last_updated();
|
||||||
|
select * from repmgr_get_last_updated();
|
||||||
Reference in New Issue
Block a user