forked from lix-project/hydra
hydra-send-stats: add a failing test asserting it can run
This commit is contained in:
parent
aeb3d2f44c
commit
6f662a606a
|
@ -9,7 +9,10 @@ use File::Basename;
|
|||
use Cwd qw(abs_path getcwd);
|
||||
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT = qw(test_init hydra_setup nrBuildsForJobset queuedBuildsForJobset nrQueuedBuildsForJobset createBaseJobset createJobsetWithOneInput evalSucceeds runBuild sendNotifications updateRepository);
|
||||
our @EXPORT = qw(test_init hydra_setup nrBuildsForJobset queuedBuildsForJobset
|
||||
nrQueuedBuildsForJobset createBaseJobset createJobsetWithOneInput
|
||||
evalSucceeds runBuild sendNotifications updateRepository
|
||||
captureStdoutStderr);
|
||||
|
||||
# Set up the environment for running tests.
|
||||
#
|
||||
|
|
20
t/scripts/hydra-send-stats.t
Normal file
20
t/scripts/hydra-send-stats.t
Normal file
|
@ -0,0 +1,20 @@
|
|||
use feature 'unicode_strings';
|
||||
use strict;
|
||||
use Setup;
|
||||
|
||||
my %ctx = test_init();
|
||||
|
||||
require Hydra::Schema;
|
||||
require Hydra::Model::DB;
|
||||
|
||||
use Test2::V0;
|
||||
|
||||
my $db = Hydra::Model::DB->new;
|
||||
hydra_setup($db);
|
||||
|
||||
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-send-stats"));
|
||||
is($stdout, "", "hydra-send-stats stdout should be empty");
|
||||
is($stderr, "", "hydra-send-stats stderr should be empty");
|
||||
is($res, 0, "hydra-send-stats --once should exit zero");
|
||||
|
||||
done_testing;
|
Loading…
Reference in a new issue