Skip to content

Commit

Permalink
Merge pull request #1264 from tphoney/multiple_ip_vhost_test
Browse files Browse the repository at this point in the history
updating the test to use ipv4 addresses
  • Loading branch information
hunner committed Nov 13, 2015
2 parents aadfffb + b9b9565 commit a0c9f8b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/acceptance/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ class { 'apache':
}
apache::vhost { 'example.com':
port => '80',
ip => ['127.0.0.1','::1'],
ip => ['127.0.0.1','127.0.0.2'],
ip_based => true,
docroot => '/var/www/html',
}
host { 'ipv4.example.com': ip => '127.0.0.1', }
host { 'ipv6.example.com': ip => '::1', }
host { 'ipv6.example.com': ip => '127.0.0.2', }
file { '/var/www/html/index.html':
ensure => file,
content => "Hello from vhost\\n",
Expand All @@ -218,16 +218,16 @@ class { 'apache':
end

describe file("#{$vhost_dir}/25-example.com.conf") do
it { is_expected.to contain '<VirtualHost 127.0.0.1:80 ::1:80>' }
it { is_expected.to contain '<VirtualHost 127.0.0.1:80 127.0.0.2:80>' }
it { is_expected.to contain "ServerName example.com" }
end

describe file($ports_file) do
it { is_expected.to be_file }
it { is_expected.to contain 'Listen 127.0.0.1:80' }
it { is_expected.to contain 'Listen ::1:80' }
it { is_expected.to contain 'Listen 127.0.0.2:80' }
it { is_expected.not_to contain 'NameVirtualHost 127.0.0.1:80' }
it { is_expected.not_to contain 'NameVirtualHost ::1:80' }
it { is_expected.not_to contain 'NameVirtualHost 127.0.0.2:80' }
end

it 'should answer to ipv4.example.com' do
Expand Down

0 comments on commit a0c9f8b

Please sign in to comment.