diff options
author | Pallavi Sontakke | 2016-04-01 11:28:38 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 10:05:04 +0000 |
commit | dd34766b22d2d4ff6c20a86719f34c6b68f2a3b7 (patch) | |
tree | 5997713746a37cf40cb32e585e975c08a97eb1e9 | |
parent | 966c1fa1cbfeb71346494c33ad20746d6b0830ed (diff) |
Modify tests
Remove cluster-cleanup at start.
Extract PGXC_CTL_HOME from ENV.
-rwxr-xr-x | contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl | 18 | ||||
-rwxr-xr-x | contrib/pgxc_ctl/t/010_pgxc_ctl.pl | 20 |
2 files changed, 18 insertions, 20 deletions
diff --git a/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl b/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl index fc0804c821..217a02db5d 100755 --- a/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl +++ b/contrib/pgxc_ctl/t/005_pgxc_ctl_minimal.pl @@ -5,17 +5,15 @@ 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/"; - +my $PGXC_CTL_HOME=$ENV{'PGXC_CTL_HOME'}; -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("rm -rf $dataDirRoot"); +system("rm -rf $PGXC_CTL_HOME"); + +program_help_ok('pgxc_ctl'); +program_version_ok('pgxc_ctl'); system_or_bail 'pgxc_ctl', 'prepare', 'minimal' ; @@ -27,5 +25,5 @@ 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"); +system("rm -rf $dataDirRoot"); +system("rm -rf $PGXC_CTL_HOME"); diff --git a/contrib/pgxc_ctl/t/010_pgxc_ctl.pl b/contrib/pgxc_ctl/t/010_pgxc_ctl.pl index ebdaa2af2b..ae853dd2ac 100755 --- a/contrib/pgxc_ctl/t/010_pgxc_ctl.pl +++ b/contrib/pgxc_ctl/t/010_pgxc_ctl.pl @@ -3,7 +3,14 @@ use warnings; use Cwd; use Config; use TestLib; -use Test::More tests => 13; +use Test::More tests => 6; + +my $dataDirRoot="~/DATA/pgxl/nodes/"; +my $PGXC_CTL_HOME=$ENV{'PGXC_CTL_HOME'}; + +#delete related dirs for cleanup +system("rm -rf $dataDirRoot"); +system("rm -rf $PGXC_CTL_HOME"); program_help_ok('pgxc_ctl'); program_version_ok('pgxc_ctl'); @@ -15,13 +22,6 @@ my $COORD3_HOST = "localhost"; 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' ; @@ -65,5 +65,5 @@ 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("rm -rf $dataDirRoot"); +system("rm -rf $PGXC_CTL_HOME"); |