summaryrefslogtreecommitdiff
path: root/t/lint.t
diff options
context:
space:
mode:
Diffstat (limited to 't/lint.t')
-rw-r--r--t/lint.t33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/lint.t b/t/lint.t
new file mode 100644
index 0000000..aa92fd1
--- /dev/null
+++ b/t/lint.t
@@ -0,0 +1,33 @@
1# -*- perl -*-
2use lib qw(t lib);
3use strict;
4use warnings;
5use Test::More;
6
7BEGIN {
8 plan tests => 7;
9 use_ok('Test::HAProxy');
10}
11
12my $hp = new Test::HAProxy;
13isa_ok($hp,'Test::HAProxy');
14
15ok($hp->lint, 'haproxy -c -f');
16
17$hp->lint(0);
18ok(!$hp->lint);
19
20$hp->lint(1);
21ok($hp->lint, 'haproxy -c -f');
22
23$hp->lint(enable => 0);
24ok(!$hp->lint);
25
26$hp->lint(enable => 1, command => '/usr/local/bin/haproxy -c -f');
27ok($hp->lint, '/usr/local/bin/haproxy -c -f');
28
29__DATA__
30global
31 log /dev/log daemon
32 user haproxy
33 group haproxy

Return to:

Send suggestions and report system problems to the System administrator.