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 => '100MB',
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: '100MB')
493 context 'log to file customizing rollover' do
495 :osfamily => osfamily,
496 :operatingsystem => operatingsystem,
497 :operatingsystemmajrelease => operatingsystemmajrelease,
501 :log_max_rollover => 10,
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: 10)
512 context 'log to file customizing size and rollover' do
514 :osfamily => osfamily,
515 :operatingsystem => operatingsystem,
516 :operatingsystemmajrelease => operatingsystemmajrelease,
520 :log_max_size => '250MB',
521 :log_max_rollover => 8,
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: '250MB',
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 file enabling the PaxOsgi appender' do
556 :osfamily => osfamily,
557 :operatingsystem => operatingsystem,
558 :operatingsystemmajrelease => operatingsystemmajrelease,
562 :enable_paxosgi_logger => true,
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(enable_paxosgi_logger: true)
573 context 'log to file disabling the PaxOsgi appender' do
575 :osfamily => osfamily,
576 :operatingsystem => operatingsystem,
577 :operatingsystemmajrelease => operatingsystemmajrelease,
581 :enable_paxosgi_logger => false,
584 # Run shared tests applicable to all supported OSs
585 # Note that this function is defined in spec_helper
588 # Run test specific to log settings
589 log_settings(enable_paxosgi_logger: false)
592 context 'log to console' do
594 :osfamily => osfamily,
595 :operatingsystem => operatingsystem,
596 :operatingsystemmajrelease => operatingsystemmajrelease,
600 :log_mechanism => 'console',
603 # Run shared tests applicable to all supported OSs
604 # Note that this function is defined in spec_helper
607 # Run test specific to log settings
608 log_settings(log_mechanism: 'console')
611 context 'log to console customizing pattern' do
613 :osfamily => osfamily,
614 :operatingsystem => operatingsystem,
615 :operatingsystemmajrelease => operatingsystemmajrelease,
619 :log_mechanism => 'console',
620 :log_pattern => '%d{ISO8601} | %-5p | %-16t | %m%n',
623 # Run shared tests applicable to all supported OSs
624 # Note that this function is defined in spec_helper
627 # Run test specific to log settings
628 log_settings(log_mechanism: 'console',
629 log_pattern: '%d{ISO8601} | %-5p | %-16t | %m%n')
632 context 'log to console enabling the PaxOsgi appender' do
634 :osfamily => osfamily,
635 :operatingsystem => operatingsystem,
636 :operatingsystemmajrelease => operatingsystemmajrelease,
640 :log_mechanism => 'console',
641 :enable_paxosgi_logger => true,
644 # Run shared tests applicable to all supported OSs
645 # Note that this function is defined in spec_helper
648 # Run test specific to log settings
649 log_settings(log_mechanism: 'console',
650 enable_paxosgi_logger: true)
653 context 'log to console disabling the PaxOsgi appender' do
655 :osfamily => osfamily,
656 :operatingsystem => operatingsystem,
657 :operatingsystemmajrelease => operatingsystemmajrelease,
661 :log_mechanism => 'console',
662 :enable_paxosgi_logger => false,
665 # Run shared tests applicable to all supported OSs
666 # Note that this function is defined in spec_helper
669 # Run test specific to log settings
670 log_settings(log_mechanism: 'console',
671 enable_paxosgi_logger: false)
674 context 'setting inactivity probe' do
676 :osfamily => osfamily,
677 :operatingsystem => operatingsystem,
678 :operatingsystemmajrelease => operatingsystemmajrelease,
682 :inactivity_probe => 99999,
685 # Run shared tests applicable to all supported OSs
686 # Note that this function is defined in spec_helper
691 # All OVSDB HA enable/disable tests
692 describe 'OVSDB HA enable/disable tests' do
693 # Non-OS-type tests assume CentOS 7
694 # See issue #43 for reasoning:
695 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
697 operatingsystem = 'CentOS'
698 operatingsystemmajrelease = '7'
699 context 'using enable_ha default' do
701 :osfamily => osfamily,
702 :operatingsystem => operatingsystem,
703 :operatingsystemmajrelease => operatingsystemmajrelease,
708 # Run shared tests applicable to all supported OSs
709 # Note that this function is defined in spec_helper
712 # Run test that specialize in checking ODL OVSDB HA config
713 # Note that this function is defined in spec_helper
717 context 'using false for enable_ha' do
719 :osfamily => osfamily,
720 :operatingsystem => operatingsystem,
721 :operatingsystemmajrelease => operatingsystemmajrelease,
728 # Run shared tests applicable to all supported OSs
729 # Note that this function is defined in spec_helper
732 # Run test that specialize in checking ODL OVSDB HA config
733 # Note that this function is defined in spec_helper
734 enable_ha_tests(enable_ha: false)
737 context 'using true for enable_ha' do
738 context 'using ha_node_count >=2' do
740 :osfamily => osfamily,
741 :operatingsystem => operatingsystem,
742 :operatingsystemmajrelease => operatingsystemmajrelease,
747 :ha_node_ips => ['0.0.0.0', '127.0.0.1']
750 # Run shared tests applicable to all supported OSs
751 # Note that this function is defined in spec_helper
754 # Run test that specialize in checking ODL OVSDB HA config
755 # Note that this function is defined in spec_helper
756 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
759 context 'using custom modules for sharding' do
761 :osfamily => osfamily,
762 :operatingsystem => operatingsystem,
763 :operatingsystemmajrelease => operatingsystemmajrelease,
768 :ha_node_ips => ['0.0.0.0', '127.0.0.1'],
769 :ha_db_modules => {'default' => false, 'topology' => 'urn:opendaylight:topology'}
772 # Run shared tests applicable to all supported OSs
773 # Note that this function is defined in spec_helper
776 # Run test that specialize in checking ODL OVSDB HA config
777 # Note that this function is defined in spec_helper
778 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
784 # All install method tests
785 describe 'install method tests' do
787 # All tests for RPM install method
789 # Non-OS-type tests assume CentOS 7
790 # See issue #43 for reasoning:
791 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
793 operatingsystem = 'CentOS'
794 operatingsystemrelease = '7.0'
795 operatingsystemmajrelease = '7'
797 context 'installing from default repo' do
799 :osfamily => osfamily,
800 :operatingsystem => operatingsystem,
801 :operatingsystemmajrelease => operatingsystemmajrelease,
804 # Run shared tests applicable to all supported OSs
805 # Note that this function is defined in spec_helper
808 # Run test that specialize in checking RPM-based installs
809 # Note that this function is defined in spec_helper
813 context 'installing from Nexus repo' do
814 rpm_repo = 'https://nexus.opendaylight.org/content/repositories/opendaylight-neon-epel-7-$basearch-devel'
816 :osfamily => osfamily,
817 :operatingsystem => operatingsystem,
818 :operatingsystemmajrelease => operatingsystemmajrelease,
822 :rpm_repo => rpm_repo,
825 # Run shared tests applicable to all supported OSs
826 # Note that this function is defined in spec_helper
829 # Run test that specialize in checking RPM-based installs
830 # Note that this function is defined in spec_helper
831 rpm_install_tests(rpm_repo: rpm_repo)
835 # All tests for Deb install method
838 operatingsystem = 'Ubuntu'
839 operatingsystemrelease = '16.04'
840 operatingsystemmajrelease = '16'
841 lsbdistcodename = 'xenial'
843 context 'installing Deb' do
845 :osfamily => osfamily,
846 :operatingsystem => operatingsystem,
847 :operatingsystemrelease => operatingsystemrelease,
848 :operatingsystemmajrelease => operatingsystemmajrelease,
849 :lsbdistid => operatingsystem,
850 :lsbdistrelease => operatingsystemrelease,
851 :lsbmajdistrelease => operatingsystemmajrelease,
852 :lsbdistcodename => lsbdistcodename,
853 :puppetversion => Puppet.version,
856 # Run shared tests applicable to all supported OSs
857 # Note that this function is defined in spec_helper
860 # Run test that specialize in checking RPM-based installs
861 # Note that this function is defined in spec_helper
865 context 'installing Nitrogen Deb' do
866 deb_repo = 'ppa:odl-team/nitrogen'
868 :osfamily => osfamily,
869 :operatingsystem => operatingsystem,
870 :operatingsystemrelease => operatingsystemrelease,
871 :operatingsystemmajrelease => operatingsystemmajrelease,
872 :lsbdistid => operatingsystem,
873 :lsbdistrelease => operatingsystemrelease,
874 :lsbmajdistrelease => operatingsystemmajrelease,
875 :lsbdistcodename => lsbdistcodename,
876 :puppetversion => Puppet.version,
880 :deb_repo => deb_repo,
883 # Run shared tests applicable to all supported OSs
884 # Note that this function is defined in spec_helper
887 # Run test that specialize in checking RPM-based installs
888 # Note that this function is defined in spec_helper
889 deb_install_tests(deb_repo: deb_repo)
894 # SNAT Mechanism tests
895 describe 'SNAT mechanism tests' do
896 # Non-OS-type tests assume CentOS 7
897 # See issue #43 for reasoning:
898 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
900 operatingsystem = 'CentOS'
901 operatingsystemmajrelease = '7'
902 context 'using controller' do
904 :osfamily => osfamily,
905 :operatingsystem => operatingsystem,
906 :operatingsystemmajrelease => operatingsystemmajrelease,
910 :extra_features => ['odl-netvirt-openstack'],
913 # Run shared tests applicable to all supported OSs
914 # Note that this function is defined in spec_helper
917 # Run test that specialize in checking security groups
918 # Note that this function is defined in spec_helper
922 context 'using conntrack' do
924 :osfamily => osfamily,
925 :operatingsystem => operatingsystem,
926 :operatingsystemmajrelease => operatingsystemmajrelease,
930 :snat_mechanism => 'conntrack',
931 :extra_features => ['odl-netvirt-openstack'],
934 # Run shared tests applicable to all supported OSs
935 # Note that this function is defined in spec_helper
938 # Run test that specialize in checking security groups
939 # Note that this function is defined in spec_helper
940 snat_mechanism_tests('conntrack')
945 describe 'SFC tests' do
946 # Non-OS-type tests assume CentOS 7
947 # See issue #43 for reasoning:
948 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
950 operatingsystem = 'CentOS'
951 operatingsystemmajrelease = '7'
952 context 'not using odl-netvirt-sfc feature' do
954 :osfamily => osfamily,
955 :operatingsystem => operatingsystem,
956 :operatingsystemmajrelease => operatingsystemmajrelease,
961 # Run shared tests applicable to all supported OSs
962 # Note that this function is defined in spec_helper
965 # Run test that specialize in checking security groups
966 # Note that this function is defined in spec_helper
970 context 'using odl-netvirt-sfc feature' do
972 :osfamily => osfamily,
973 :operatingsystem => operatingsystem,
974 :operatingsystemmajrelease => operatingsystemmajrelease,
978 :extra_features => ['odl-netvirt-sfc'],
981 # Run shared tests applicable to all supported OSs
982 # Note that this function is defined in spec_helper
985 # Run test that specialize in checking security groups
986 # Note that this function is defined in spec_helper
987 sfc_tests(extra_features: ['odl-netvirt-sfc'])
992 describe 'DSCP marking tests' do
993 # Non-OS-type tests assume CentOS 7
994 # See issue #43 for reasoning:
995 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
997 operatingsystem = 'CentOS'
998 operatingsystemmajrelease = '7'
999 context 'use default value' do
1001 :osfamily => osfamily,
1002 :operatingsystem => operatingsystem,
1003 :operatingsystemmajrelease => operatingsystemmajrelease,
1008 # Run shared tests applicable to all supported OSs
1009 # Note that this function is defined in spec_helper
1012 # Run test that specialize in checking security groups
1013 # Note that this function is defined in spec_helper
1017 context 'inherit DSCP values' do
1019 :osfamily => osfamily,
1020 :operatingsystem => operatingsystem,
1021 :operatingsystemmajrelease => operatingsystemmajrelease,
1025 :inherit_dscp_marking => :true,
1028 # Run shared tests applicable to all supported OSs
1029 # Note that this function is defined in spec_helper
1032 # Run test that specialize in checking security groups
1033 # Note that this function is defined in spec_helper
1034 dscp_tests(inherit_dscp_marking: true)
1038 # VPP routing node config tests
1039 describe 'VPP routing node tests' do
1040 # Non-OS-type tests assume CentOS 7
1041 # See issue #43 for reasoning:
1042 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1044 operatingsystem = 'CentOS'
1045 operatingsystemmajrelease = '7'
1046 context 'using default - no routing node' do
1048 :osfamily => osfamily,
1049 :operatingsystem => operatingsystem,
1050 :operatingsystemmajrelease => operatingsystemmajrelease,
1055 # Run shared tests applicable to all supported OSs
1056 # Note that this function is defined in spec_helper
1059 # Run test that specialize in checking routing-node config
1060 # Note that this function is defined in spec_helper
1061 vpp_routing_node_tests
1064 context 'using node name for routing node' do
1066 :osfamily => osfamily,
1067 :operatingsystem => operatingsystem,
1068 :operatingsystemmajrelease => operatingsystemmajrelease,
1072 :vpp_routing_node => 'test-node-1',
1075 # Run shared tests applicable to all supported OSs
1076 # Note that this function is defined in spec_helper
1079 # Run test that specialize in checking routing-node config
1080 # Note that this function is defined in spec_helper
1081 vpp_routing_node_tests(routing_node: 'test-node-1')
1085 # ODL username/password tests
1086 describe 'ODL username/password tests' do
1087 # Non-OS-type tests assume CentOS 7
1088 # See issue #43 for reasoning:
1089 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1091 operatingsystem = 'CentOS'
1092 operatingsystemmajrelease = '7'
1093 context 'using default username/password' do
1095 :osfamily => osfamily,
1096 :operatingsystem => operatingsystem,
1097 :operatingsystemmajrelease => operatingsystemmajrelease,
1102 # Run shared tests applicable to all supported OSs
1103 # Note that this function is defined in spec_helper
1106 # Run test that specialize in checking username/password config
1107 # Note that this function is defined in spec_helper
1108 username_password_tests('admin','admin')
1111 context 'specifying non-default username/password' do
1113 :osfamily => osfamily,
1114 :operatingsystem => operatingsystem,
1115 :operatingsystemmajrelease => operatingsystemmajrelease,
1119 :username => 'test',
1123 # Run shared tests applicable to all supported OSs
1124 # Note that this function is defined in spec_helper
1127 # Run test that specialize in checking routing-node config
1128 # Note that this function is defined in spec_helper
1129 username_password_tests('test', 'test')
1133 # websocket address tests
1134 describe 'ODL websocket address tests' do
1135 # Non-OS-type tests assume CentOS 7
1136 # See issue #43 for reasoning:
1137 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1139 operatingsystem = 'CentOS'
1140 operatingsystemmajrelease = '7'
1141 context 'using default websocket address' do
1143 :osfamily => osfamily,
1144 :operatingsystem => operatingsystem,
1145 :operatingsystemmajrelease => operatingsystemmajrelease,
1150 # Run shared tests applicable to all supported OSs
1151 # Note that this function is defined in spec_helper
1154 # Run test that specialize in checking websocket address
1155 # Note that this function is defined in spec_helper
1156 odl_websocket_address_tests
1159 context 'overriding websocket address' do
1161 :osfamily => osfamily,
1162 :operatingsystem => operatingsystem,
1163 :operatingsystemmajrelease => operatingsystemmajrelease,
1167 :odl_bind_ip => '127.0.0.1'
1170 # Run shared tests applicable to all supported OSs
1171 # Note that this function is defined in spec_helper
1172 generic_tests(odl_bind_ip: '127.0.0.1')
1174 # Run test that specialize in checking websocket address
1175 # Note that this function is defined in spec_helper
1176 odl_websocket_address_tests(odl_bind_ip: '127.0.0.1')
1181 describe 'ODL TLS tests' do
1182 # Non-OS-type tests assume CentOS 7
1183 # See issue #43 for reasoning:
1184 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1186 operatingsystem = 'CentOS'
1187 operatingsystemmajrelease = '7'
1188 context 'enabling TLS without required keystore password (negative test)' do
1190 :osfamily => osfamily,
1191 :operatingsystem => operatingsystem,
1192 :operatingsystemmajrelease => operatingsystemmajrelease,
1196 :enable_tls => :true
1199 # Run test that specialize in checking TLS
1200 # Note that this function is defined in spec_helper
1201 odl_tls_tests(enable_tls:true)
1203 context 'enabling TLS with required params' do
1205 :osfamily => osfamily,
1206 :operatingsystem => operatingsystem,
1207 :operatingsystemmajrelease => operatingsystemmajrelease,
1211 :enable_tls => true,
1212 :tls_keystore_password => '123456',
1215 # Run shared tests applicable to all supported OSs
1216 # Note that this function is defined in spec_helper
1219 # Run test that specialize in checking TLS
1220 # Note that this function is defined in spec_helper
1221 odl_tls_tests(enable_tls:true, tls_keystore_password:'123456')
1225 describe 'polling enablement settings' do
1226 # Non-OS-type tests assume CentOS 7
1227 # See issue #43 for reasoning:
1228 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1230 operatingsystem = 'CentOS'
1231 operatingsystemmajrelease = '7'
1233 # Default statistics polling off
1234 context 'do not poll ovs statistics' do
1236 :osfamily => osfamily,
1237 :operatingsystem => operatingsystem,
1238 :operatingsystemmajrelease => operatingsystemmajrelease,
1243 # Run shared tests applicable to all supported OSs
1244 # Note that this function is defined in spec_helper
1247 # Run test specific to log settings
1248 stats_polling_enablement_tests
1251 # Default statistics polling on
1252 context 'poll ovs statistics' do
1254 :osfamily => osfamily,
1255 :operatingsystem => operatingsystem,
1256 :operatingsystemmajrelease => operatingsystemmajrelease,
1260 :stats_polling_enabled => true,
1263 # Run shared tests applicable to all supported OSs
1264 # Note that this function is defined in spec_helper
1267 # Run test specific to log settings
1268 stats_polling_enablement_tests(stats_polling_enabled:true)
1272 describe 'Different IPv support tests' do
1273 # Non-OS-type tests assume CentOS 7
1274 # See issue #43 for reasoning:
1275 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1277 operatingsystem = 'CentOS'
1278 operatingsystemmajrelease = '7'
1280 context 'IPv6 deployment' do
1282 :osfamily => osfamily,
1283 :operatingsystem => operatingsystem,
1284 :operatingsystemmajrelease => operatingsystemmajrelease,
1288 :odl_bind_ip => '::1'
1291 # Run shared tests applicable to all supported OSs
1292 # Note that this function is defined in spec_helper
1293 generic_tests(odl_bind_ip:'::1')
1296 context 'IPv4 deployment' do
1298 :osfamily => osfamily,
1299 :operatingsystem => operatingsystem,
1300 :operatingsystemmajrelease => operatingsystemmajrelease,
1304 :odl_bind_ip => '127.0.0.1'
1307 # Run shared tests applicable to all supported OSs
1308 # Note that this function is defined in spec_helper
1309 generic_tests(odl_bind_ip:'127.0.0.1')