Skip to content

Commit ce06491

Browse files
authored
Merge pull request #2300 from traylenator/reverse
Test proxy_dest_reverse_match parameter
2 parents 87755cf + 1572f13 commit ce06491

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

spec/defines/vhost_spec.rb

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,8 @@
12871287
).with_content(%r{## Proxy rules})
12881288
}
12891289
end
1290-
context 'proxy_dest_match' do
1290+
1291+
context 'proxy_dest_match and no proxy_dest_reverse_match' do
12911292
let :params do
12921293
{
12931294
'docroot' => '/rspec/docroot',
@@ -1296,7 +1297,24 @@
12961297
end
12971298

12981299
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{## Proxy rules}) }
1300+
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{ProxyPassMatch\s+/\s+//}) }
1301+
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{ProxyPassReverse\s+/\s+/}) }
1302+
end
1303+
1304+
context 'proxy_dest_match and proxy_dest_reverse_match' do
1305+
let :params do
1306+
{
1307+
'docroot' => '/rspec/docroot',
1308+
'proxy_dest_match' => '/',
1309+
'proxy_dest_reverse_match' => 'http://localhost:8180',
1310+
}
1311+
end
1312+
1313+
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{## Proxy rules}) }
1314+
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{ProxyPassMatch\s+/\s+//}) }
1315+
it { is_expected.to contain_concat__fragment('rspec.example.com-proxy').with_content(%r{ProxyPassReverse\s+/\s+http://localhost:8180/}) }
12991316
end
1317+
13001318
context 'not everything can be set together...' do
13011319
let :params do
13021320
{

0 commit comments

Comments
 (0)