nagios4/t/910-noservice.t

21 lines
464 B
Perl
Raw Permalink Normal View History

2017-05-19 22:22:40 +02:00
#!/usr/bin/perl
#
# Check that no service gives the correct message
use warnings;
use strict;
use Test::More;
use FindBin qw($Bin);
chdir $Bin or die "Cannot chdir";
my $topdir = "$Bin/..";
my $nagios = "$topdir/base/nagios";
my $etc = "$Bin/etc";
my $precache = "$Bin/var/objects.precache";
plan tests => 1;
my $output = `$nagios -v "$etc/nagios-no-service.cfg"`;
like( $output, "/Error: There are no services defined!/", "Correct error for no services" );