| 
46 | 46 |             # NB: Only testing defaults here, specialized enabling L3 tests elsewhere  | 
47 | 47 |             # Note that this function is defined in spec_helper  | 
48 | 48 |             enable_l3_tests  | 
 | 49 | + | 
 | 50 | +            # Run tests that specialize in checking ODL DHCP Service config  | 
 | 51 | +            # NB: Only testing defaults here, specialized enabling DHCP tests elsewhere  | 
 | 52 | +            # Note that this function is defined in spec_helper  | 
 | 53 | +            enable_dhcp_tests  | 
49 | 54 |           end  | 
50 | 55 |         end  | 
51 | 56 | 
 
  | 
 | 
105 | 110 |             # NB: Only testing defaults here, specialized enabling L3 tests elsewhere  | 
106 | 111 |             # Note that this function is defined in spec_helper  | 
107 | 112 |             enable_l3_tests  | 
 | 113 | + | 
 | 114 | +            # Run tests that specialize in checking ODL DHCP Service config  | 
 | 115 | +            # NB: Only testing defaults here, specialized enabling DHCP tests elsewhere  | 
 | 116 | +            # Note that this function is defined in spec_helper  | 
 | 117 | +            enable_dhcp_tests  | 
108 | 118 |           end  | 
109 | 119 |         end  | 
110 | 120 | 
 
  | 
 | 
180 | 190 |             # NB: Only testing defaults here, specialized enabling L3 tests elsewhere  | 
181 | 191 |             # Note that this function is defined in spec_helper  | 
182 | 192 |             enable_l3_tests  | 
 | 193 | + | 
 | 194 | +            # Run tests that specialize in checking ODL DHCP Service config  | 
 | 195 | +            # NB: Only testing defaults here, specialized enabling DHCP tests elsewhere  | 
 | 196 | +            # Note that this function is defined in spec_helper  | 
 | 197 | +            enable_dhcp_tests  | 
183 | 198 |           end  | 
184 | 199 |         end  | 
185 | 200 | 
 
  | 
 | 
538 | 553 |     end  | 
539 | 554 |   end  | 
540 | 555 | 
 
  | 
 | 556 | +  # All DHCP Service enable/disable tests  | 
 | 557 | +  describe 'DHCP Service enable/disable tests' do  | 
 | 558 | +    # Non-OS-type tests assume CentOS 7  | 
 | 559 | +    #   See issue #43 for reasoning:  | 
 | 560 | +    #   https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159  | 
 | 561 | +    osfamily = 'RedHat'  | 
 | 562 | +    operatingsystem = 'CentOS'  | 
 | 563 | +    operatingsystemmajrelease = '7'  | 
 | 564 | +    context 'using enable_dhcp default' do  | 
 | 565 | +      let(:facts) {{  | 
 | 566 | +        :osfamily => osfamily,  | 
 | 567 | +        :operatingsystem => operatingsystem,  | 
 | 568 | +        :operatingsystemmajrelease => operatingsystemmajrelease,  | 
 | 569 | +      }}  | 
 | 570 | + | 
 | 571 | +      let(:params) {{ }}  | 
 | 572 | + | 
 | 573 | +      # Run shared tests applicable to all supported OSs  | 
 | 574 | +      # Note that this function is defined in spec_helper  | 
 | 575 | +      generic_tests  | 
 | 576 | + | 
 | 577 | +      # Run test that specialize in checking ODL DHCP Service config  | 
 | 578 | +      # Note that this function is defined in spec_helper  | 
 | 579 | +      enable_dhcp_tests  | 
 | 580 | +    end  | 
 | 581 | + | 
 | 582 | +    context 'using false for enable_dhcp' do  | 
 | 583 | +      let(:facts) {{  | 
 | 584 | +        :osfamily => osfamily,  | 
 | 585 | +        :operatingsystem => operatingsystem,  | 
 | 586 | +        :operatingsystemmajrelease => operatingsystemmajrelease,  | 
 | 587 | +      }}  | 
 | 588 | + | 
 | 589 | +      let(:params) {{  | 
 | 590 | +        :enable_dhcp => false ,  | 
 | 591 | +      }}  | 
 | 592 | + | 
 | 593 | +      # Run shared tests applicable to all supported OSs  | 
 | 594 | +      # Note that this function is defined in spec_helper  | 
 | 595 | +      generic_tests  | 
 | 596 | + | 
 | 597 | +      # Run test that specialize in checking ODL DHCP Service config  | 
 | 598 | +      # Note that this function is defined in spec_helper  | 
 | 599 | +      enable_dhcp_tests(enable_dhcp: false)  | 
 | 600 | +    end  | 
 | 601 | + | 
 | 602 | +    context 'using true for enable_dhcp' do  | 
 | 603 | +      let(:facts) {{  | 
 | 604 | +        :osfamily => osfamily,  | 
 | 605 | +        :operatingsystem => operatingsystem,  | 
 | 606 | +        :operatingsystemmajrelease => operatingsystemmajrelease,  | 
 | 607 | +      }}  | 
 | 608 | + | 
 | 609 | +      let(:params) {{  | 
 | 610 | +        :enable_dhcp => true,  | 
 | 611 | +      }}  | 
 | 612 | + | 
 | 613 | +      # Run shared tests applicable to all supported OSs  | 
 | 614 | +      # Note that this function is defined in spec_helper  | 
 | 615 | +      generic_tests  | 
 | 616 | + | 
 | 617 | +      # Run test that specialize in checking ODL DHCP Service config  | 
 | 618 | +      # Note that this function is defined in spec_helper  | 
 | 619 | +      enable_dhcp_tests(enable_dhcp: true)  | 
 | 620 | +    end  | 
 | 621 | +  end  | 
 | 622 | + | 
541 | 623 |   # All install method tests  | 
542 | 624 |   describe 'install method tests' do  | 
543 | 625 |     # Non-OS-type tests assume CentOS 7  | 
 | 
0 commit comments