You've already forked pgbackrest
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:
52
test/lib/pgBackRestTest/Module/Help/HelpHelpTest.pm
Normal file
52
test/lib/pgBackRestTest/Module/Help/HelpHelpTest.pm
Normal 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;
|
Reference in New Issue
Block a user