Commit ef68467a authored by Brandon Walts's avatar Brandon Walts
Browse files

tests run if AccountingDisabled is set or unset

parent 37bd34e0
......@@ -21,7 +21,7 @@ use warnings;
use Cwd;
use File::Basename;
use Test::More;
use Test::More tests => 20;
use Test::Exception;
use Bio::EnsEMBL::Hive::Utils::Config;
......@@ -183,19 +183,19 @@ my $expected_bacct = {
},
};
unless ($lsf_meadow->config_get('AccountingDisabled')) {
lives_and( sub {
local $ENV{EHIVE_EXPECTED_BACCT} = '-l 34 56[7]';
my $h = $lsf_meadow->get_report_entries_for_process_ids(34, '56[7]');
is_deeply($h, $expected_bacct, 'Got bacct output');
}, 'Can call bacct on process_ids');
lives_and( sub {
local $ENV{EHIVE_EXPECTED_BACCT} = '-l -C 2015/10/11/12:23,2015/12/12/23:58 -u kb3';
my $h = $lsf_meadow->get_report_entries_for_time_interval('2015-10-11 12:23:45', '2015-12-12 23:56:59', 'kb3');
is_deeply($h, $expected_bacct, 'Got bacct output');
}, 'Can call bacct on a date range');
}
$lsf_meadow->config_set("AccountingDisabled", 0);
lives_and( sub {
local $ENV{EHIVE_EXPECTED_BACCT} = '-l 34 56[7]';
my $h = $lsf_meadow->get_report_entries_for_process_ids(34, '56[7]');
is_deeply($h, $expected_bacct, 'Got bacct output');
}, 'Can call bacct on process_ids');
lives_and( sub {
local $ENV{EHIVE_EXPECTED_BACCT} = '-l -C 2015/10/11/12:23,2015/12/12/23:58 -u kb3';
my $h = $lsf_meadow->get_report_entries_for_time_interval('2015-10-11 12:23:45', '2015-12-12 23:56:59', 'kb3');
is_deeply($h, $expected_bacct, 'Got bacct output');
}, 'Can call bacct on a date range');
$lsf_meadow->config_set("AccountingDisabled", 1);
lives_and( sub {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment