3 describe 'opendaylight' do
4 # All tests that check OS support/not-support
5 describe 'OS support tests' do
6 # All tests for OSs in the Red Hat family (CentOS, Fedora)
7 describe 'OS family Red Hat ' do
11 operatingsystem = 'Fedora'
13 # All tests for supported versions of Fedora
14 ['25', '26'].each do |operatingsystemmajrelease|
15 context "#{operatingsystemmajrelease}" do
17 :osfamily => osfamily,
18 :operatingsystem => operatingsystem,
19 :operatingsystemmajrelease => operatingsystemmajrelease,
21 # Run shared tests applicable to all supported OSs
22 # Note that this function is defined in spec_helper
25 # Run tests that specialize in checking rpm-based installs
26 # NB: Only testing defaults here, specialized rpm tests elsewhere
27 # Note that this function is defined in spec_helper
28 rpm_install_tests(operatingsystem: operatingsystem)
30 # Run tests that specialize in checking Karaf feature installs
31 # NB: Only testing defaults here, specialized Karaf tests elsewhere
32 # Note that this function is defined in spec_helper
35 # Run tests that specialize in checking ODL's REST port config
36 # NB: Only testing defaults here, specialized log level tests elsewhere
37 # Note that this function is defined in spec_helper
40 # Run tests that specialize in checking custom log level config
41 # NB: Only testing defaults here, specialized log level tests elsewhere
42 # Note that this function is defined in spec_helper
45 # Run tests that specialize in checking ODL OVSDB HA config
46 # NB: Only testing defaults here, specialized enabling HA tests elsewhere
47 # Note that this function is defined in spec_helper
50 # Run tests that specialize in checking log file settings
51 # NB: Only testing defaults here, specialized log file settings tests elsewhere
52 # Note that this function is defined in spec_helper
57 # All tests for unsupported versions of Fedora
58 ['23'].each do |operatingsystemmajrelease|
59 context "#{operatingsystemmajrelease}" do
61 :osfamily => osfamily,
62 :operatingsystem => operatingsystem,
63 :operatingsystemmajrelease => operatingsystemmajrelease,
65 # Run shared tests applicable to all unsupported OSs
66 # Note that this function is defined in spec_helper
67 expected_msg = "Unsupported OS: #{operatingsystem} #{operatingsystemmajrelease}"
68 unsupported_os_tests(expected_msg: expected_msg)
73 # All tests for CentOS
75 operatingsystem = 'CentOS'
77 # All tests for supported versions of CentOS
78 ['7'].each do |operatingsystemmajrelease|
79 context "#{operatingsystemmajrelease}" do
81 :osfamily => osfamily,
82 :operatingsystem => operatingsystem,
83 :operatingsystemmajrelease => operatingsystemmajrelease,
85 # Run shared tests applicable to all supported OSs
86 # Note that this function is defined in spec_helper
89 # Run test that specialize in checking rpm-based installs
90 # NB: Only testing defaults here, specialized rpm tests elsewhere
91 # Note that this function is defined in spec_helper
94 # Run test that specialize in checking Karaf feature installs
95 # NB: Only testing defaults here, specialized Karaf tests elsewhere
96 # Note that this function is defined in spec_helper
99 # Run tests that specialize in checking ODL's REST port config
100 # NB: Only testing defaults here, specialized log level tests elsewhere
101 # Note that this function is defined in spec_helper
104 # Run test that specialize in checking custom log level config
105 # NB: Only testing defaults here, specialized log level tests elsewhere
106 # Note that this function is defined in spec_helper
109 # Run tests that specialize in checking ODL OVSDB HA config
110 # NB: Only testing defaults here, specialized enabling HA tests elsewhere
111 # Note that this function is defined in spec_helper
114 # Run tests that specialize in checking log file settings
115 # NB: Only testing defaults here, specialized log file settings tests elsewhere
116 # Note that this function is defined in spec_helper
121 # All tests for unsupported versions of CentOS
122 ['6'].each do |operatingsystemmajrelease|
123 context "#{operatingsystemmajrelease}" do
125 :osfamily => osfamily,
126 :operatingsystem => operatingsystem,
127 :operatingsystemmajrelease => operatingsystemmajrelease,
129 # Run shared tests applicable to all unsupported OSs
130 # Note that this function is defined in spec_helper
131 expected_msg = "Unsupported OS: #{operatingsystem} #{operatingsystemmajrelease}"
132 unsupported_os_tests(expected_msg: expected_msg)
138 # All tests for OSs in the Debian family (Ubuntu)
139 describe 'OS family Debian' do
142 # All tests for Ubuntu 16.04
144 operatingsystem = 'Ubuntu'
146 # All tests for supported versions of Ubuntu
147 ['16.04'].each do |operatingsystemrelease|
148 context "#{operatingsystemrelease}" do
150 :osfamily => osfamily,
151 :operatingsystem => operatingsystem,
152 :operatingsystemrelease => operatingsystemrelease,
153 :lsbdistid => operatingsystem,
154 :lsbdistrelease => operatingsystemrelease,
155 :lsbdistcodename => 'xenial',
156 :puppetversion => '4.9.0',
157 :path => ['/usr/local/bin', '/usr/bin', '/bin'],
160 # Run shared tests applicable to all supported OSs
161 # Note that this function is defined in spec_helper
164 # Run test that specialize in checking deb-based installs
165 # Note that this function is defined in spec_helper
168 # Run test that specialize in checking Karaf feature installs
169 # NB: Only testing defaults here, specialized Karaf tests elsewhere
170 # Note that this function is defined in spec_helper
173 # Run tests that specialize in checking ODL's REST port config
174 # NB: Only testing defaults here, specialized log level tests elsewhere
175 # Note that this function is defined in spec_helper
178 # Run test that specialize in checking custom log level config
179 # NB: Only testing defaults here, specialized log level tests elsewhere
180 # Note that this function is defined in spec_helper
183 # Run tests that specialize in checking ODL OVSDB HA config
184 # NB: Only testing defaults here, specialized enabling HA tests elsewhere
185 # Note that this function is defined in spec_helper
188 # Run tests that specialize in checking log file settings
189 # NB: Only testing defaults here, specialized log file settings tests elsewhere
190 # Note that this function is defined in spec_helper
195 # All tests for unsupported versions of Ubuntu
196 ['12.04', '14.04', '15.10'].each do |operatingsystemrelease|
197 context "#{operatingsystemrelease}" do
199 :osfamily => osfamily,
200 :operatingsystem => operatingsystem,
201 :operatingsystemrelease => operatingsystemrelease,
202 :lsbdistid => operatingsystem,
203 :lsbdistrelease => operatingsystemrelease,
204 :lsbdistcodename => 'xenial',
205 :puppetversion => '4.9.0',
207 # Run shared tests applicable to all unsupported OSs
208 # Note that this function is defined in spec_helper
209 expected_msg = "Unsupported OS: #{operatingsystem} #{operatingsystemrelease}"
210 unsupported_os_tests(expected_msg: expected_msg)
216 # All tests for unsupported OS families
217 ['Suse', 'Solaris'].each do |osfamily|
218 context "OS family #{osfamily}" do
220 :osfamily => osfamily,
223 # Run shared tests applicable to all unsupported OSs
224 # Note that this function is defined in spec_helper
225 expected_msg = "Unsupported OS family: #{osfamily}"
226 unsupported_os_tests(expected_msg: expected_msg)
231 # All Karaf feature tests
232 describe 'Karaf feature tests' do
233 # Non-OS-type tests assume CentOS 7
234 # See issue #43 for reasoning:
235 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
237 operatingsystem = 'CentOS'
238 operatingsystemmajrelease = '7'
239 describe 'using default features' do
240 context 'and not passing extra features' do
242 :osfamily => osfamily,
243 :operatingsystem => operatingsystem,
244 :operatingsystemmajrelease => operatingsystemmajrelease,
249 # Run shared tests applicable to all supported OSs
250 # Note that this function is defined in spec_helper
253 # Run test that specialize in checking Karaf feature installs
254 # Note that this function is defined in spec_helper
258 context 'and passing extra features' do
260 :osfamily => osfamily,
261 :operatingsystem => operatingsystem,
262 :operatingsystemmajrelease => operatingsystemmajrelease,
265 # These are real but arbitrarily chosen features
266 extra_features = ['odl-base-all', 'odl-ovsdb-all']
268 :extra_features => extra_features,
271 # Run shared tests applicable to all supported OSs
272 # Note that this function is defined in spec_helper
275 # Run test that specialize in checking Karaf feature installs
276 # Note that this function is defined in spec_helper
277 karaf_feature_tests(extra_features: extra_features)
281 describe 'overriding default features' do
282 default_features = ['standard', 'ssh']
283 context 'and not passing extra features' do
285 :osfamily => osfamily,
286 :operatingsystem => operatingsystem,
287 :operatingsystemmajrelease => operatingsystemmajrelease,
291 :default_features => default_features,
294 # Run shared tests applicable to all supported OSs
295 # Note that this function is defined in spec_helper
298 # Run test that specialize in checking Karaf feature installs
299 # Note that this function is defined in spec_helper
300 karaf_feature_tests(default_features: default_features)
303 context 'and passing extra features' do
305 :osfamily => osfamily,
306 :operatingsystem => operatingsystem,
307 :operatingsystemmajrelease => operatingsystemmajrelease,
310 # These are real but arbitrarily chosen features
311 extra_features = ['odl-base-all', 'odl-ovsdb-all']
313 :default_features => default_features,
314 :extra_features => extra_features,
317 # Run shared tests applicable to all supported OSs
318 # Note that this function is defined in spec_helper
321 # Run test that specialize in checking Karaf feature installs
322 # Note that this function is defined in spec_helper
323 karaf_feature_tests(default_features: default_features, extra_features: extra_features)
328 # All ODL IP/REST port tests
329 describe 'IP and REST port tests' do
330 # Non-OS-type tests assume CentOS 7
331 # See issue #43 for reasoning:
332 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
334 operatingsystem = 'CentOS'
335 operatingsystemmajrelease = '7'
336 context 'using default REST port' do
338 :osfamily => osfamily,
339 :operatingsystem => operatingsystem,
340 :operatingsystemmajrelease => operatingsystemmajrelease,
345 # Run shared tests applicable to all supported OSs
346 # Note that this function is defined in spec_helper
349 # Run test that specialize in checking ODL REST port config
350 # Note that this function is defined in spec_helper
354 context 'overriding default REST and IP port' do
356 :osfamily => osfamily,
357 :operatingsystem => operatingsystem,
358 :operatingsystemmajrelease => operatingsystemmajrelease,
362 :odl_rest_port => 7777,
363 :odl_bind_ip => '127.0.0.1'
366 # Run shared tests applicable to all supported OSs
367 # Note that this function is defined in spec_helper
368 generic_tests(odl_bind_ip: '127.0.0.1')
370 # Run test that specialize in checking ODL REST port config
371 # Note that this function is defined in spec_helper
372 odl_rest_port_tests(odl_rest_port: 7777, odl_bind_ip: '127.0.0.1')
376 # All custom log level tests
377 describe 'custom log level tests' do
378 # Non-OS-type tests assume CentOS 7
379 # See issue #43 for reasoning:
380 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
382 operatingsystem = 'CentOS'
383 operatingsystemmajrelease = '7'
384 context 'using default log levels' do
386 :osfamily => osfamily,
387 :operatingsystem => operatingsystem,
388 :operatingsystemmajrelease => operatingsystemmajrelease,
393 # Run shared tests applicable to all supported OSs
394 # Note that this function is defined in spec_helper
397 # Run test that specialize in checking custom log level config
398 # Note that this function is defined in spec_helper
402 context 'adding one custom log level' do
404 :osfamily => osfamily,
405 :operatingsystem => operatingsystem,
406 :operatingsystemmajrelease => operatingsystemmajrelease,
409 custom_log_levels = { 'org.opendaylight.ovsdb' => 'TRACE' }
412 :log_levels => custom_log_levels,
415 # Run shared tests applicable to all supported OSs
416 # Note that this function is defined in spec_helper
419 # Run test that specialize in checking log level config
420 # Note that this function is defined in spec_helper
421 log_level_tests(log_levels: custom_log_levels)
424 context 'adding two custom log levels' do
426 :osfamily => osfamily,
427 :operatingsystem => operatingsystem,
428 :operatingsystemmajrelease => operatingsystemmajrelease,
431 custom_log_levels = { 'org.opendaylight.ovsdb' => 'TRACE',
432 'org.opendaylight.ovsdb.lib' => 'INFO' }
435 :log_levels => custom_log_levels,
438 # Run shared tests applicable to all supported OSs
439 # Note that this function is defined in spec_helper
442 # Run test that specialize in checking log level config
443 # Note that this function is defined in spec_helper
444 log_level_tests(log_levels: custom_log_levels)
448 describe 'log mechanism settings' do
449 # Non-OS-type tests assume CentOS 7
450 # See issue #43 for reasoning:
451 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
453 operatingsystem = 'CentOS'
454 operatingsystemmajrelease = '7'
456 # All custom log file size and rollover tests
457 context 'log to file using default size and rollover' do
459 :osfamily => osfamily,
460 :operatingsystem => operatingsystem,
461 :operatingsystemmajrelease => operatingsystemmajrelease,
466 # Run shared tests applicable to all supported OSs
467 # Note that this function is defined in spec_helper
470 # Run test specific to log settings
474 context 'log to file customizing size' do
476 :osfamily => osfamily,
477 :operatingsystem => operatingsystem,
478 :operatingsystemmajrelease => operatingsystemmajrelease,
482 :log_max_size => '1GB',
485 # Run shared tests applicable to all supported OSs
486 # Note that this function is defined in spec_helper
489 # Run test specific to log settings
490 log_settings(log_max_size: '1GB')
493 context 'log to file customizing rollover' do
495 :osfamily => osfamily,
496 :operatingsystem => operatingsystem,
497 :operatingsystemmajrelease => operatingsystemmajrelease,
501 :log_max_rollover => 3,
504 # Run shared tests applicable to all supported OSs
505 # Note that this function is defined in spec_helper
508 # Run test specific to log settings
509 log_settings(log_max_rollover: 3)
512 context 'log to file customizing size and rollover' do
514 :osfamily => osfamily,
515 :operatingsystem => operatingsystem,
516 :operatingsystemmajrelease => operatingsystemmajrelease,
520 :log_max_size => '1GB',
521 :log_max_rollover => 3,
522 :log_rollover_fileindex => 'min'
525 # Run shared tests applicable to all supported OSs
526 # Note that this function is defined in spec_helper
529 # Run test specific to log settings
530 log_settings(log_max_size: '1GB',
532 log_rollover_fileindex: 'min')
535 context 'log to file customizing pattern' do
537 :osfamily => osfamily,
538 :operatingsystem => operatingsystem,
539 :operatingsystemmajrelease => operatingsystemmajrelease,
543 :log_pattern => '%d{ISO8601} | %-5p | %-16t | %m%n',
546 # Run shared tests applicable to all supported OSs
547 # Note that this function is defined in spec_helper
550 # Run test specific to log settings
551 log_settings(log_pattern: '%d{ISO8601} | %-5p | %-16t | %m%n')
554 context 'log to console' do
556 :osfamily => osfamily,
557 :operatingsystem => operatingsystem,
558 :operatingsystemmajrelease => operatingsystemmajrelease,
562 :log_mechanism => 'console',
565 # Run shared tests applicable to all supported OSs
566 # Note that this function is defined in spec_helper
569 # Run test specific to log settings
570 log_settings(log_mechanism: 'console')
573 context 'log to console customizing pattern' do
575 :osfamily => osfamily,
576 :operatingsystem => operatingsystem,
577 :operatingsystemmajrelease => operatingsystemmajrelease,
581 :log_mechanism => 'console',
582 :log_pattern => '%d{ISO8601} | %-5p | %-16t | %m%n',
585 # Run shared tests applicable to all supported OSs
586 # Note that this function is defined in spec_helper
589 # Run test specific to log settings
590 log_settings(log_mechanism: 'console',
591 log_pattern: '%d{ISO8601} | %-5p | %-16t | %m%n')
594 context 'setting inactivity probe' do
596 :osfamily => osfamily,
597 :operatingsystem => operatingsystem,
598 :operatingsystemmajrelease => operatingsystemmajrelease,
602 :inactivity_probe => 99999,
605 # Run shared tests applicable to all supported OSs
606 # Note that this function is defined in spec_helper
611 # All OVSDB HA enable/disable tests
612 describe 'OVSDB HA enable/disable tests' do
613 # Non-OS-type tests assume CentOS 7
614 # See issue #43 for reasoning:
615 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
617 operatingsystem = 'CentOS'
618 operatingsystemmajrelease = '7'
619 context 'using enable_ha default' do
621 :osfamily => osfamily,
622 :operatingsystem => operatingsystem,
623 :operatingsystemmajrelease => operatingsystemmajrelease,
628 # Run shared tests applicable to all supported OSs
629 # Note that this function is defined in spec_helper
632 # Run test that specialize in checking ODL OVSDB HA config
633 # Note that this function is defined in spec_helper
637 context 'using false for enable_ha' do
639 :osfamily => osfamily,
640 :operatingsystem => operatingsystem,
641 :operatingsystemmajrelease => operatingsystemmajrelease,
648 # Run shared tests applicable to all supported OSs
649 # Note that this function is defined in spec_helper
652 # Run test that specialize in checking ODL OVSDB HA config
653 # Note that this function is defined in spec_helper
654 enable_ha_tests(enable_ha: false)
657 context 'using true for enable_ha' do
658 context 'using ha_node_count >=2' do
660 :osfamily => osfamily,
661 :operatingsystem => operatingsystem,
662 :operatingsystemmajrelease => operatingsystemmajrelease,
667 :ha_node_ips => ['0.0.0.0', '127.0.0.1']
670 # Run shared tests applicable to all supported OSs
671 # Note that this function is defined in spec_helper
674 # Run test that specialize in checking ODL OVSDB HA config
675 # Note that this function is defined in spec_helper
676 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
679 context 'using custom modules for sharding' do
681 :osfamily => osfamily,
682 :operatingsystem => operatingsystem,
683 :operatingsystemmajrelease => operatingsystemmajrelease,
688 :ha_node_ips => ['0.0.0.0', '127.0.0.1'],
689 :ha_db_modules => {'default' => false, 'topology' => 'urn:opendaylight:topology'}
692 # Run shared tests applicable to all supported OSs
693 # Note that this function is defined in spec_helper
696 # Run test that specialize in checking ODL OVSDB HA config
697 # Note that this function is defined in spec_helper
698 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
704 # All install method tests
705 describe 'install method tests' do
707 # All tests for RPM install method
709 # Non-OS-type tests assume CentOS 7
710 # See issue #43 for reasoning:
711 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
713 operatingsystem = 'CentOS'
714 operatingsystemrelease = '7.0'
715 operatingsystemmajrelease = '7'
717 context 'installing from default repo' do
719 :osfamily => osfamily,
720 :operatingsystem => operatingsystem,
721 :operatingsystemmajrelease => operatingsystemmajrelease,
724 # Run shared tests applicable to all supported OSs
725 # Note that this function is defined in spec_helper
728 # Run test that specialize in checking RPM-based installs
729 # Note that this function is defined in spec_helper
733 context 'installing from Nexus repo' do
734 rpm_repo = 'https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-$basearch-devel'
736 :osfamily => osfamily,
737 :operatingsystem => operatingsystem,
738 :operatingsystemmajrelease => operatingsystemmajrelease,
742 :rpm_repo => rpm_repo,
745 # Run shared tests applicable to all supported OSs
746 # Note that this function is defined in spec_helper
749 # Run test that specialize in checking RPM-based installs
750 # Note that this function is defined in spec_helper
751 rpm_install_tests(rpm_repo: rpm_repo)
755 # All tests for Deb install method
758 operatingsystem = 'Ubuntu'
759 operatingsystemrelease = '16.04'
760 operatingsystemmajrelease = '16'
761 lsbdistcodename = 'xenial'
763 context 'installing Deb' do
765 :osfamily => osfamily,
766 :operatingsystem => operatingsystem,
767 :operatingsystemrelease => operatingsystemrelease,
768 :operatingsystemmajrelease => operatingsystemmajrelease,
769 :lsbdistid => operatingsystem,
770 :lsbdistrelease => operatingsystemrelease,
771 :lsbmajdistrelease => operatingsystemmajrelease,
772 :lsbdistcodename => lsbdistcodename,
773 :puppetversion => Puppet.version,
776 # Run shared tests applicable to all supported OSs
777 # Note that this function is defined in spec_helper
780 # Run test that specialize in checking RPM-based installs
781 # Note that this function is defined in spec_helper
785 context 'installing Nitrogen Deb' do
786 deb_repo = 'ppa:odl-team/nitrogen'
788 :osfamily => osfamily,
789 :operatingsystem => operatingsystem,
790 :operatingsystemrelease => operatingsystemrelease,
791 :operatingsystemmajrelease => operatingsystemmajrelease,
792 :lsbdistid => operatingsystem,
793 :lsbdistrelease => operatingsystemrelease,
794 :lsbmajdistrelease => operatingsystemmajrelease,
795 :lsbdistcodename => lsbdistcodename,
796 :puppetversion => Puppet.version,
800 :deb_repo => deb_repo,
803 # Run shared tests applicable to all supported OSs
804 # Note that this function is defined in spec_helper
807 # Run test that specialize in checking RPM-based installs
808 # Note that this function is defined in spec_helper
809 deb_install_tests(deb_repo: deb_repo)
814 # SNAT Mechanism tests
815 describe 'SNAT mechanism tests' do
816 # Non-OS-type tests assume CentOS 7
817 # See issue #43 for reasoning:
818 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
820 operatingsystem = 'CentOS'
821 operatingsystemmajrelease = '7'
822 context 'using controller' do
824 :osfamily => osfamily,
825 :operatingsystem => operatingsystem,
826 :operatingsystemmajrelease => operatingsystemmajrelease,
830 :extra_features => ['odl-netvirt-openstack'],
833 # Run shared tests applicable to all supported OSs
834 # Note that this function is defined in spec_helper
837 # Run test that specialize in checking security groups
838 # Note that this function is defined in spec_helper
842 context 'using conntrack' do
844 :osfamily => osfamily,
845 :operatingsystem => operatingsystem,
846 :operatingsystemmajrelease => operatingsystemmajrelease,
850 :snat_mechanism => 'conntrack',
851 :extra_features => ['odl-netvirt-openstack'],
854 # Run shared tests applicable to all supported OSs
855 # Note that this function is defined in spec_helper
858 # Run test that specialize in checking security groups
859 # Note that this function is defined in spec_helper
860 snat_mechanism_tests('conntrack')
865 describe 'SFC tests' do
866 # Non-OS-type tests assume CentOS 7
867 # See issue #43 for reasoning:
868 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
870 operatingsystem = 'CentOS'
871 operatingsystemmajrelease = '7'
872 context 'not using odl-netvirt-sfc feature' do
874 :osfamily => osfamily,
875 :operatingsystem => operatingsystem,
876 :operatingsystemmajrelease => operatingsystemmajrelease,
881 # Run shared tests applicable to all supported OSs
882 # Note that this function is defined in spec_helper
885 # Run test that specialize in checking security groups
886 # Note that this function is defined in spec_helper
890 context 'using odl-netvirt-sfc feature' do
892 :osfamily => osfamily,
893 :operatingsystem => operatingsystem,
894 :operatingsystemmajrelease => operatingsystemmajrelease,
898 :extra_features => ['odl-netvirt-sfc'],
901 # Run shared tests applicable to all supported OSs
902 # Note that this function is defined in spec_helper
905 # Run test that specialize in checking security groups
906 # Note that this function is defined in spec_helper
907 sfc_tests(extra_features: ['odl-netvirt-sfc'])
912 describe 'DSCP marking tests' do
913 # Non-OS-type tests assume CentOS 7
914 # See issue #43 for reasoning:
915 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
917 operatingsystem = 'CentOS'
918 operatingsystemmajrelease = '7'
919 context 'use default value' do
921 :osfamily => osfamily,
922 :operatingsystem => operatingsystem,
923 :operatingsystemmajrelease => operatingsystemmajrelease,
928 # Run shared tests applicable to all supported OSs
929 # Note that this function is defined in spec_helper
932 # Run test that specialize in checking security groups
933 # Note that this function is defined in spec_helper
937 context 'inherit DSCP values' do
939 :osfamily => osfamily,
940 :operatingsystem => operatingsystem,
941 :operatingsystemmajrelease => operatingsystemmajrelease,
945 :inherit_dscp_marking => :true,
948 # Run shared tests applicable to all supported OSs
949 # Note that this function is defined in spec_helper
952 # Run test that specialize in checking security groups
953 # Note that this function is defined in spec_helper
954 dscp_tests(inherit_dscp_marking: true)
958 # VPP routing node config tests
959 describe 'VPP routing node tests' do
960 # Non-OS-type tests assume CentOS 7
961 # See issue #43 for reasoning:
962 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
964 operatingsystem = 'CentOS'
965 operatingsystemmajrelease = '7'
966 context 'using default - no routing node' do
968 :osfamily => osfamily,
969 :operatingsystem => operatingsystem,
970 :operatingsystemmajrelease => operatingsystemmajrelease,
975 # Run shared tests applicable to all supported OSs
976 # Note that this function is defined in spec_helper
979 # Run test that specialize in checking routing-node config
980 # Note that this function is defined in spec_helper
981 vpp_routing_node_tests
984 context 'using node name for routing node' do
986 :osfamily => osfamily,
987 :operatingsystem => operatingsystem,
988 :operatingsystemmajrelease => operatingsystemmajrelease,
992 :vpp_routing_node => 'test-node-1',
995 # Run shared tests applicable to all supported OSs
996 # Note that this function is defined in spec_helper
999 # Run test that specialize in checking routing-node config
1000 # Note that this function is defined in spec_helper
1001 vpp_routing_node_tests(routing_node: 'test-node-1')
1005 # ODL username/password tests
1006 describe 'ODL username/password tests' do
1007 # Non-OS-type tests assume CentOS 7
1008 # See issue #43 for reasoning:
1009 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1011 operatingsystem = 'CentOS'
1012 operatingsystemmajrelease = '7'
1013 context 'using default username/password' do
1015 :osfamily => osfamily,
1016 :operatingsystem => operatingsystem,
1017 :operatingsystemmajrelease => operatingsystemmajrelease,
1022 # Run shared tests applicable to all supported OSs
1023 # Note that this function is defined in spec_helper
1026 # Run test that specialize in checking username/password config
1027 # Note that this function is defined in spec_helper
1028 username_password_tests('admin','admin')
1031 context 'specifying non-default username/password' do
1033 :osfamily => osfamily,
1034 :operatingsystem => operatingsystem,
1035 :operatingsystemmajrelease => operatingsystemmajrelease,
1039 :username => 'test',
1043 # Run shared tests applicable to all supported OSs
1044 # Note that this function is defined in spec_helper
1047 # Run test that specialize in checking routing-node config
1048 # Note that this function is defined in spec_helper
1049 username_password_tests('test', 'test')
1053 # websocket address tests
1054 describe 'ODL websocket address tests' do
1055 # Non-OS-type tests assume CentOS 7
1056 # See issue #43 for reasoning:
1057 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1059 operatingsystem = 'CentOS'
1060 operatingsystemmajrelease = '7'
1061 context 'using default websocket address' do
1063 :osfamily => osfamily,
1064 :operatingsystem => operatingsystem,
1065 :operatingsystemmajrelease => operatingsystemmajrelease,
1070 # Run shared tests applicable to all supported OSs
1071 # Note that this function is defined in spec_helper
1074 # Run test that specialize in checking websocket address
1075 # Note that this function is defined in spec_helper
1076 odl_websocket_address_tests
1079 context 'overriding websocket address' do
1081 :osfamily => osfamily,
1082 :operatingsystem => operatingsystem,
1083 :operatingsystemmajrelease => operatingsystemmajrelease,
1087 :odl_bind_ip => '127.0.0.1'
1090 # Run shared tests applicable to all supported OSs
1091 # Note that this function is defined in spec_helper
1092 generic_tests(odl_bind_ip: '127.0.0.1')
1094 # Run test that specialize in checking websocket address
1095 # Note that this function is defined in spec_helper
1096 odl_websocket_address_tests(odl_bind_ip: '127.0.0.1')
1101 describe 'ODL TLS tests' do
1102 # Non-OS-type tests assume CentOS 7
1103 # See issue #43 for reasoning:
1104 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1106 operatingsystem = 'CentOS'
1107 operatingsystemmajrelease = '7'
1108 context 'enabling TLS without required keystore password (negative test)' do
1110 :osfamily => osfamily,
1111 :operatingsystem => operatingsystem,
1112 :operatingsystemmajrelease => operatingsystemmajrelease,
1116 :enable_tls => :true
1119 # Run test that specialize in checking TLS
1120 # Note that this function is defined in spec_helper
1121 odl_tls_tests(enable_tls:true)
1123 context 'enabling TLS with required params' do
1125 :osfamily => osfamily,
1126 :operatingsystem => operatingsystem,
1127 :operatingsystemmajrelease => operatingsystemmajrelease,
1131 :enable_tls => true,
1132 :tls_keystore_password => '123456',
1135 # Run shared tests applicable to all supported OSs
1136 # Note that this function is defined in spec_helper
1139 # Run test that specialize in checking TLS
1140 # Note that this function is defined in spec_helper
1141 odl_tls_tests(enable_tls:true, tls_keystore_password:'123456')
1145 describe 'polling enablement settings' do
1146 # Non-OS-type tests assume CentOS 7
1147 # See issue #43 for reasoning:
1148 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1150 operatingsystem = 'CentOS'
1151 operatingsystemmajrelease = '7'
1153 # Default statistics polling off
1154 context 'do not poll ovs statistics' do
1156 :osfamily => osfamily,
1157 :operatingsystem => operatingsystem,
1158 :operatingsystemmajrelease => operatingsystemmajrelease,
1163 # Run shared tests applicable to all supported OSs
1164 # Note that this function is defined in spec_helper
1167 # Run test specific to log settings
1168 stats_polling_enablement_tests
1171 # Default statistics polling on
1172 context 'poll ovs statistics' do
1174 :osfamily => osfamily,
1175 :operatingsystem => operatingsystem,
1176 :operatingsystemmajrelease => operatingsystemmajrelease,
1180 :stats_polling_enabled => true,
1183 # Run shared tests applicable to all supported OSs
1184 # Note that this function is defined in spec_helper
1187 # Run test specific to log settings
1188 stats_polling_enablement_tests(stats_polling_enabled:true)
1192 describe 'Different IPv support tests' do
1193 # Non-OS-type tests assume CentOS 7
1194 # See issue #43 for reasoning:
1195 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1197 operatingsystem = 'CentOS'
1198 operatingsystemmajrelease = '7'
1200 context 'IPv6 deployment' do
1202 :osfamily => osfamily,
1203 :operatingsystem => operatingsystem,
1204 :operatingsystemmajrelease => operatingsystemmajrelease,
1208 :odl_bind_ip => '::1'
1211 # Run shared tests applicable to all supported OSs
1212 # Note that this function is defined in spec_helper
1213 generic_tests(odl_bind_ip:'::1')
1216 context 'IPv4 deployment' do
1218 :osfamily => osfamily,
1219 :operatingsystem => operatingsystem,
1220 :operatingsystemmajrelease => operatingsystemmajrelease,
1224 :odl_bind_ip => '127.0.0.1'
1227 # Run shared tests applicable to all supported OSs
1228 # Note that this function is defined in spec_helper
1229 generic_tests(odl_bind_ip:'127.0.0.1')