aboutsummaryrefslogtreecommitdiff
path: root/spec/acceptance/dhcp_server_spec.rb
blob: ae54c9f65a7b24f32e7c1946c9ce2fdd095477c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper_acceptance'

describe 'dhcp::server' do
  describe 'running puppet code' do
    it 'should work with no errors' do
      pp = <<-EOS
        class { 'dhcp::server': }
        dhcp::subnet { '172.17.0.0':
          ensure     => present,
          broadcast  => '172.17.0.255',
          other_opts => ['range 172.17.0.100 172.17.0.250'],
        }
      EOS

      # Run it twice and test for idempotency
      apply_manifest(pp, :catch_failures => true)
      apply_manifest(pp, :catch_changes => true)
    end
  end
end