1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-06-16 23:47:38 +02:00

Moved test and env modules to new directories to avoid namespace conflicts with common tests.

This commit is contained in:
David Steele
2017-05-12 16:43:04 -04:00
parent 4049d59c9e
commit c31da3f961
47 changed files with 160 additions and 146 deletions

View File

@ -0,0 +1,52 @@
####################################################################################################################################
# HelpHelpTest.pm - Tests for help command
####################################################################################################################################
package pgBackRestTest::Module::Help::HelpHelpTest;
use parent 'pgBackRestTest::Common::RunTest';
####################################################################################################################################
# Perl includes
####################################################################################################################################
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
use pgBackRest::Common::Log;
use pgBackRest::Config::Config;
use pgBackRestTest::Env::Host::HostBaseTest;
use pgBackRestTest::Common::ExecuteTest;
####################################################################################################################################
# helpExecute
####################################################################################################################################
sub helpExecute
{
my $self = shift;
my $strCommand = shift;
executeTest($self->backrestExe() . " $strCommand", {oLogTest => $self->expect()});
}
####################################################################################################################################
# run
####################################################################################################################################
sub run
{
my $self = shift;
# Increment the run, log, and decide whether this unit test should be run
if ($self->begin('base'))
{
$self->helpExecute(CMD_VERSION);
$self->helpExecute(CMD_HELP);
$self->helpExecute(CMD_HELP . ' version');
$self->helpExecute(CMD_HELP . ' --output=json --stanza=main info');
$self->helpExecute(CMD_HELP . ' --output=json --stanza=main info output');
}
}
1;