diff options
author | Pallavi Sontakke | 2016-03-30 07:04:11 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 10:05:03 +0000 |
commit | 7ad9c47393143071116aacd22a9d2439a1c79cd3 (patch) | |
tree | b34053d3b6b3f6ee752d68d5b3fc6e24f8b124e8 | |
parent | 05ccdfcf5e3d4418dfec50709aae7b66c19e19f2 (diff) |
Add test for pgxc_ctl minimal config
Add some more cleanup to TAP tests.
-rwxr-xr-x | contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl | 31 | ||||
-rwxr-xr-x | contrib/pgxc_ctl/t/010_pgxc_ctl.pl | 9 |
2 files changed, 40 insertions, 0 deletions
diff --git a/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl b/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl new file mode 100755 index 0000000000..fc0804c821 --- /dev/null +++ b/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl @@ -0,0 +1,31 @@ +use strict; +use warnings; +use Cwd; +use Config; +use TestLib; +use Test::More tests => 6; + +program_help_ok('pgxc_ctl'); +program_version_ok('pgxc_ctl'); + +my $dataDirRoot="~/DATA/pgxl/nodes/"; +my $pgxcCtlRoot="~/pgxc_ctl/"; + + +system_or_bail 'pgxc_ctl', 'clean', 'all' ; +#delete related dirs for cleanup +my $result = system("rm -rf $dataDirRoot"); +my $result = system("rm -rf $pgxcCtlRoot"); + +system_or_bail 'pgxc_ctl', 'prepare', 'minimal' ; + +system_or_bail 'pgxc_ctl', 'init', 'all' ; + +system_or_bail 'pgxc_ctl', 'monitor', 'all' ; + +#add cleanup +system_or_bail 'pgxc_ctl', 'clean', 'all' ; + +#delete related dirs for cleanup +my $result = system("rm -rf $dataDirRoot"); +my $result = system("rm -rf $pgxcCtlRoot"); diff --git a/contrib/pgxc_ctl/t/010_pgxc_ctl.pl b/contrib/pgxc_ctl/t/010_pgxc_ctl.pl index de186759c3..ebdaa2af2b 100755 --- a/contrib/pgxc_ctl/t/010_pgxc_ctl.pl +++ b/contrib/pgxc_ctl/t/010_pgxc_ctl.pl @@ -16,6 +16,12 @@ my $DN1_HOST = "localhost"; my $DN2_HOST = "localhost"; my $DN3_HOST = "localhost"; my $dataDirRoot="~/DATA/pgxl/nodes"; +my $pgxcCtlRoot="~/pgxc_ctl/"; + +system_or_bail 'pgxc_ctl', 'clean', 'all' ; +#delete related dirs for cleanup +my $result = system("rm -rf $dataDirRoot"); +my $result = system("rm -rf $pgxcCtlRoot"); system_or_bail 'pgxc_ctl', 'prepare', 'config', 'empty' ; @@ -58,3 +64,6 @@ system_or_bail 'pgxc_ctl', 'monitor', 'all' ; system_or_bail 'pgxc_ctl', 'clean', 'all' ; +#delete related dirs for cleanup +my $result = system("rm -rf $dataDirRoot"); +my $result = system("rm -rf $pgxcCtlRoot"); |