diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2018-03-23 08:42:25 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2018-03-23 08:42:25 -0400 |
commit | 5700aa130186e0b5d600806645b051bfd9067f09 (patch) | |
tree | a0723266de87dd974c7546c1748a3925f5f57563 | |
parent | 2111a48a0c5e5198a68cba0c8fb82c4f61be5928 (diff) | |
download | postgresql-5700aa130186e0b5d600806645b051bfd9067f09.tar.gz postgresql-5700aa130186e0b5d600806645b051bfd9067f09.zip |
pg_resetwal: Add simple test suite
Some subsequent patches will add to this, but to avoid conflicts, set up
the basics separately.
-rw-r--r-- | src/bin/pg_resetwal/.gitignore | 1 | ||||
-rw-r--r-- | src/bin/pg_resetwal/Makefile | 7 | ||||
-rw-r--r-- | src/bin/pg_resetwal/t/001_basic.pl | 17 |
3 files changed, 25 insertions, 0 deletions
diff --git a/src/bin/pg_resetwal/.gitignore b/src/bin/pg_resetwal/.gitignore index 236abb4323c..56bade5ea44 100644 --- a/src/bin/pg_resetwal/.gitignore +++ b/src/bin/pg_resetwal/.gitignore @@ -1 +1,2 @@ /pg_resetwal +/tmp_check/ diff --git a/src/bin/pg_resetwal/Makefile b/src/bin/pg_resetwal/Makefile index 5ab7ad33e0a..e49d52b9288 100644 --- a/src/bin/pg_resetwal/Makefile +++ b/src/bin/pg_resetwal/Makefile @@ -33,3 +33,10 @@ uninstall: clean distclean maintainer-clean: rm -f pg_resetwal$(X) $(OBJS) + rm -rf tmp_check + +check: + $(prove_check) + +installcheck: + $(prove_installcheck) diff --git a/src/bin/pg_resetwal/t/001_basic.pl b/src/bin/pg_resetwal/t/001_basic.pl new file mode 100644 index 00000000000..1b157cb5557 --- /dev/null +++ b/src/bin/pg_resetwal/t/001_basic.pl @@ -0,0 +1,17 @@ +use strict; +use warnings; + +use PostgresNode; +use TestLib; +use Test::More tests => 11; + +program_help_ok('pg_resetwal'); +program_version_ok('pg_resetwal'); +program_options_handling_ok('pg_resetwal'); + +my $node = get_new_node('main'); +$node->init; + +command_like([ 'pg_resetwal', '-n', $node->data_dir ], + qr/checkpoint/, + 'pg_resetwal -n produces output'); |