Skip to content

Commit

Permalink
Merge pull request #477 from antaflos/fix_option_order_name
Browse files Browse the repository at this point in the history
Fix 'option' entry name in option_order hash
  • Loading branch information
daianamezdrea committed Apr 12, 2021
2 parents 9d2d7b0 + 0599083 commit d5a4629
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions spec/defines/listen_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,10 @@
'capture request header' => ['X-Forwarded-For len 50', 'Host len 15', 'Referrer len 15'],
'acl' => ['dst_dev01 dst_port 48001', 'dst_dev02 dst_port 48002', 'dst_dev03 dst_port 48003'],
'use_backend' => ['dev01_webapp if dst_dev01', 'dev02_webapp if dst_dev02', 'dev03_webapp if dst_dev03'],
'option' => ['httplog', 'http-server-close', 'forwardfor except 127.0.0.1'],
'option' => ['httpchk', 'httplog', 'http-server-close', 'forwardfor except 127.0.0.1'],
'compression' => 'algo gzip',
'bind-process' => 'all',
'http-check' => ['send hdr Host test.example.com meth GET uri /health', 'expect status 204'],
},
}
end
Expand All @@ -399,7 +400,7 @@
is_expected.to contain_concat__fragment('haproxy-apache_listen_block').with(
'order' => '20-apache-00',
'target' => '/etc/haproxy/haproxy.cfg',
'content' => "\nlisten apache\n bind 0.0.0.0:48001-48003 \n mode http\n acl dst_dev01 dst_port 48001\n acl dst_dev02 dst_port 48002\n acl dst_dev03 dst_port 48003\n bind-process all\n capture request header X-Forwarded-For len 50\n capture request header Host len 15\n capture request header Referrer len 15\n compression algo gzip\n option httplog\n option http-server-close\n option forwardfor except 127.0.0.1\n reqidel ^X-Forwarded-For:.*\n reqadd X-Forwarded-Proto:\\ https\n use_backend dev01_webapp if dst_dev01\n use_backend dev02_webapp if dst_dev02\n use_backend dev03_webapp if dst_dev03\n default_backend dev00_webapp\n", # rubocop:disable Layout/LineLength
'content' => "\nlisten apache\n bind 0.0.0.0:48001-48003 \n mode http\n acl dst_dev01 dst_port 48001\n acl dst_dev02 dst_port 48002\n acl dst_dev03 dst_port 48003\n bind-process all\n capture request header X-Forwarded-For len 50\n capture request header Host len 15\n capture request header Referrer len 15\n compression algo gzip\n reqidel ^X-Forwarded-For:.*\n reqadd X-Forwarded-Proto:\\ https\n use_backend dev01_webapp if dst_dev01\n use_backend dev02_webapp if dst_dev02\n use_backend dev03_webapp if dst_dev03\n default_backend dev00_webapp\n option httpchk\n option httplog\n option http-server-close\n option forwardfor except 127.0.0.1\n http-check send hdr Host test.example.com meth GET uri /health\n http-check expect status 204\n", # rubocop:disable Layout/LineLength
)
}
end
Expand Down
2 changes: 1 addition & 1 deletion templates/fragments/_options.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'use_backend' => 8,
'default_backend' => 9,
'use-server' => 9,
'options' => 10,
'option' => 10,
'http-check' => 11,
'server' => 100,
}
Expand Down

0 comments on commit d5a4629

Please sign in to comment.