summaryrefslogtreecommitdiffabout
path: root/t/select.t
blob: 0be1c9ce6a1cc1666ca22b910fa17dd0fffc35e6 (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
34
35
36
37
38
39
40
41
42
43
# -*- perl -*-
use lib qw(t lib);
use strict;
use warnings;
use Test::More;
use autodie;

BEGIN {
    plan tests => 4; 
    use_ok('Test::HAProxy');
}

my $hp = new Test::HAProxy;
isa_ok($hp,'Test::HAProxy');

is(join(',', map { $_->arg(0) } $hp->select ( name => 'frontend' )),
   'in,ins',
   'simple select');

is(join(',', map { $_->arg(0) } $hp->select ( name => 'frontend',
	                                      arg => { n => 0, v => 'in' } )),
   'in',
   'complex select');


__DATA__
global
    log /dev/log daemon
    user haproxy
    group haproxy
defaults
    log global
    mode http
frontend in
    mode http
    bind :::80 v4v6
backend out
    server localhost http://127.0.0.1
frontend ins
    mode https
    bind :::443 v4v6

   

Return to:

Send suggestions and report system problems to the System administrator.