blob: aa92fd13d011949e1ec5b0c61909a14cb6a6c192 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# -*- perl -*-
use lib qw(t lib);
use strict;
use warnings;
use Test::More;
BEGIN {
plan tests => 7;
use_ok('Test::HAProxy');
}
my $hp = new Test::HAProxy;
isa_ok($hp,'Test::HAProxy');
ok($hp->lint, 'haproxy -c -f');
$hp->lint(0);
ok(!$hp->lint);
$hp->lint(1);
ok($hp->lint, 'haproxy -c -f');
$hp->lint(enable => 0);
ok(!$hp->lint);
$hp->lint(enable => 1, command => '/usr/local/bin/haproxy -c -f');
ok($hp->lint, '/usr/local/bin/haproxy -c -f');
__DATA__
global
log /dev/log daemon
user haproxy
group haproxy
|