diff options
author | Jeanneret Cedric <contact@internux.ch> | 2015-11-06 08:57:26 +0100 |
---|---|---|
committer | Jeanneret Cedric <contact@internux.ch> | 2015-11-06 08:57:26 +0100 |
commit | b2fcb15c7f3e54720d23a1ad2002dadd872668df (patch) | |
tree | 1f324dd54a27b7d89d4f45679e2aa4a7716a2193 /spec/acceptance/dhcp_failover_spec.rb | |
parent | b5ee63a48adbea3e50300e2c0c26c575ec1b5abb (diff) | |
parent | 42f495f3525bc740ea3b2451cfedac912167f843 (diff) | |
download | puppet-dhcp-b2fcb15c7f3e54720d23a1ad2002dadd872668df.tar.gz puppet-dhcp-b2fcb15c7f3e54720d23a1ad2002dadd872668df.tar.bz2 |
Merge pull request #17 from camptocamp/failover-corrected
Failover corrected
Diffstat (limited to 'spec/acceptance/dhcp_failover_spec.rb')
-rw-r--r-- | spec/acceptance/dhcp_failover_spec.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/spec/acceptance/dhcp_failover_spec.rb b/spec/acceptance/dhcp_failover_spec.rb new file mode 100644 index 0000000..5e93c67 --- /dev/null +++ b/spec/acceptance/dhcp_failover_spec.rb @@ -0,0 +1,38 @@ +require 'spec_helper_acceptance' + +describe 'dhcp::failover' do + describe 'with defaults' do + it 'should work with no error' do + pp = <<-EOS + class { 'dhcp::server': } + dhcp::failover {'my-failover': + peer_address => '1.1.1.1', + options => { + 'max-response-delay' => 30, + 'max-unacked-updates' => 10, + 'load balance max seconds' => 3, + 'mclt' => 1800, + 'split' => 128, + } + } + $ipaddr = split($::networking['interfaces']['eth0']['ip'], '[.]') + $sub = "${ipaddr[0]}.${ipaddr[1]}.${ipaddr[2]}" + dhcp::subnet {$::networking['interfaces']['eth0']['network']: + broadcast => "${sub}.255", + subnet_mask => $::networking['interfaces']['eth0']['netmask'], + domain_name => 'test.com', + other_opts => [ + "option domain-name-servers ${sub}.1, ${sub}.2", + 'option domain-search "test.com", "internal.test.com"', + 'pool {', + 'failover peer "my-failover"', + "range ${sub}.100 ${sub}.250", + '}', + ] + } + EOS + apply_manifest(pp, :catch_failures => true) + apply_manifest(pp, :catch_changes => true) + end + end +end |