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 console' do
537 :osfamily => osfamily,
538 :operatingsystem => operatingsystem,
539 :operatingsystemmajrelease => operatingsystemmajrelease,
543 :log_mechanism => 'console',
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_mechanism: 'console')
555 # All OVSDB HA enable/disable tests
556 describe 'OVSDB HA enable/disable tests' do
557 # Non-OS-type tests assume CentOS 7
558 # See issue #43 for reasoning:
559 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
561 operatingsystem = 'CentOS'
562 operatingsystemmajrelease = '7'
563 context 'using enable_ha default' do
565 :osfamily => osfamily,
566 :operatingsystem => operatingsystem,
567 :operatingsystemmajrelease => operatingsystemmajrelease,
572 # Run shared tests applicable to all supported OSs
573 # Note that this function is defined in spec_helper
576 # Run test that specialize in checking ODL OVSDB HA config
577 # Note that this function is defined in spec_helper
581 context 'using false for enable_ha' do
583 :osfamily => osfamily,
584 :operatingsystem => operatingsystem,
585 :operatingsystemmajrelease => operatingsystemmajrelease,
592 # Run shared tests applicable to all supported OSs
593 # Note that this function is defined in spec_helper
596 # Run test that specialize in checking ODL OVSDB HA config
597 # Note that this function is defined in spec_helper
598 enable_ha_tests(enable_ha: false)
601 context 'using true for enable_ha' do
602 context 'using ha_node_count >=2' do
604 :osfamily => osfamily,
605 :operatingsystem => operatingsystem,
606 :operatingsystemmajrelease => operatingsystemmajrelease,
611 :ha_node_ips => ['0.0.0.0', '127.0.0.1']
614 # Run shared tests applicable to all supported OSs
615 # Note that this function is defined in spec_helper
618 # Run test that specialize in checking ODL OVSDB HA config
619 # Note that this function is defined in spec_helper
620 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
623 context 'using custom modules for sharding' do
625 :osfamily => osfamily,
626 :operatingsystem => operatingsystem,
627 :operatingsystemmajrelease => operatingsystemmajrelease,
632 :ha_node_ips => ['0.0.0.0', '127.0.0.1'],
633 :ha_db_modules => {'default' => false, 'topology' => 'urn:opendaylight:topology'}
636 # Run shared tests applicable to all supported OSs
637 # Note that this function is defined in spec_helper
640 # Run test that specialize in checking ODL OVSDB HA config
641 # Note that this function is defined in spec_helper
642 enable_ha_tests(enable_ha: true, ha_node_ips: ['0.0.0.0', '127.0.0.1'])
648 # All install method tests
649 describe 'install method tests' do
651 # All tests for RPM install method
653 # Non-OS-type tests assume CentOS 7
654 # See issue #43 for reasoning:
655 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
657 operatingsystem = 'CentOS'
658 operatingsystemrelease = '7.0'
659 operatingsystemmajrelease = '7'
661 context 'installing from default repo' do
663 :osfamily => osfamily,
664 :operatingsystem => operatingsystem,
665 :operatingsystemmajrelease => operatingsystemmajrelease,
668 # Run shared tests applicable to all supported OSs
669 # Note that this function is defined in spec_helper
672 # Run test that specialize in checking RPM-based installs
673 # Note that this function is defined in spec_helper
677 context 'installing from Nexus repo' do
678 rpm_repo = 'https://nexus.opendaylight.org/content/repositories/opendaylight-fluorine-epel-7-$basearch-devel'
680 :osfamily => osfamily,
681 :operatingsystem => operatingsystem,
682 :operatingsystemmajrelease => operatingsystemmajrelease,
686 :rpm_repo => rpm_repo,
689 # Run shared tests applicable to all supported OSs
690 # Note that this function is defined in spec_helper
693 # Run test that specialize in checking RPM-based installs
694 # Note that this function is defined in spec_helper
695 rpm_install_tests(rpm_repo: rpm_repo)
699 # All tests for Deb install method
702 operatingsystem = 'Ubuntu'
703 operatingsystemrelease = '16.04'
704 operatingsystemmajrelease = '16'
705 lsbdistcodename = 'xenial'
707 context 'installing Deb' do
709 :osfamily => osfamily,
710 :operatingsystem => operatingsystem,
711 :operatingsystemrelease => operatingsystemrelease,
712 :operatingsystemmajrelease => operatingsystemmajrelease,
713 :lsbdistid => operatingsystem,
714 :lsbdistrelease => operatingsystemrelease,
715 :lsbmajdistrelease => operatingsystemmajrelease,
716 :lsbdistcodename => lsbdistcodename,
717 :puppetversion => Puppet.version,
720 # Run shared tests applicable to all supported OSs
721 # Note that this function is defined in spec_helper
724 # Run test that specialize in checking RPM-based installs
725 # Note that this function is defined in spec_helper
729 context 'installing Nitrogen Deb' do
730 deb_repo = 'ppa:odl-team/nitrogen'
732 :osfamily => osfamily,
733 :operatingsystem => operatingsystem,
734 :operatingsystemrelease => operatingsystemrelease,
735 :operatingsystemmajrelease => operatingsystemmajrelease,
736 :lsbdistid => operatingsystem,
737 :lsbdistrelease => operatingsystemrelease,
738 :lsbmajdistrelease => operatingsystemmajrelease,
739 :lsbdistcodename => lsbdistcodename,
740 :puppetversion => Puppet.version,
744 :deb_repo => deb_repo,
747 # Run shared tests applicable to all supported OSs
748 # Note that this function is defined in spec_helper
751 # Run test that specialize in checking RPM-based installs
752 # Note that this function is defined in spec_helper
753 deb_install_tests(deb_repo: deb_repo)
758 # SNAT Mechanism tests
759 describe 'SNAT mechanism tests' do
760 # Non-OS-type tests assume CentOS 7
761 # See issue #43 for reasoning:
762 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
764 operatingsystem = 'CentOS'
765 operatingsystemmajrelease = '7'
766 context 'using controller' do
768 :osfamily => osfamily,
769 :operatingsystem => operatingsystem,
770 :operatingsystemmajrelease => operatingsystemmajrelease,
774 :extra_features => ['odl-netvirt-openstack'],
777 # Run shared tests applicable to all supported OSs
778 # Note that this function is defined in spec_helper
781 # Run test that specialize in checking security groups
782 # Note that this function is defined in spec_helper
786 context 'using conntrack' do
788 :osfamily => osfamily,
789 :operatingsystem => operatingsystem,
790 :operatingsystemmajrelease => operatingsystemmajrelease,
794 :snat_mechanism => 'conntrack',
795 :extra_features => ['odl-netvirt-openstack'],
798 # Run shared tests applicable to all supported OSs
799 # Note that this function is defined in spec_helper
802 # Run test that specialize in checking security groups
803 # Note that this function is defined in spec_helper
804 snat_mechanism_tests('conntrack')
809 describe 'SFC tests' do
810 # Non-OS-type tests assume CentOS 7
811 # See issue #43 for reasoning:
812 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
814 operatingsystem = 'CentOS'
815 operatingsystemmajrelease = '7'
816 context 'not using odl-netvirt-sfc feature' do
818 :osfamily => osfamily,
819 :operatingsystem => operatingsystem,
820 :operatingsystemmajrelease => operatingsystemmajrelease,
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 security groups
830 # Note that this function is defined in spec_helper
834 context 'using odl-netvirt-sfc feature' do
836 :osfamily => osfamily,
837 :operatingsystem => operatingsystem,
838 :operatingsystemmajrelease => operatingsystemmajrelease,
842 :extra_features => ['odl-netvirt-sfc'],
845 # Run shared tests applicable to all supported OSs
846 # Note that this function is defined in spec_helper
849 # Run test that specialize in checking security groups
850 # Note that this function is defined in spec_helper
851 sfc_tests(extra_features: ['odl-netvirt-sfc'])
856 describe 'DSCP marking tests' do
857 # Non-OS-type tests assume CentOS 7
858 # See issue #43 for reasoning:
859 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
861 operatingsystem = 'CentOS'
862 operatingsystemmajrelease = '7'
863 context 'use default value' do
865 :osfamily => osfamily,
866 :operatingsystem => operatingsystem,
867 :operatingsystemmajrelease => operatingsystemmajrelease,
872 # Run shared tests applicable to all supported OSs
873 # Note that this function is defined in spec_helper
876 # Run test that specialize in checking security groups
877 # Note that this function is defined in spec_helper
881 context 'inherit DSCP values' do
883 :osfamily => osfamily,
884 :operatingsystem => operatingsystem,
885 :operatingsystemmajrelease => operatingsystemmajrelease,
889 :inherit_dscp_marking => :true,
892 # Run shared tests applicable to all supported OSs
893 # Note that this function is defined in spec_helper
896 # Run test that specialize in checking security groups
897 # Note that this function is defined in spec_helper
898 dscp_tests(inherit_dscp_marking: true)
902 # VPP routing node config tests
903 describe 'VPP routing node tests' do
904 # Non-OS-type tests assume CentOS 7
905 # See issue #43 for reasoning:
906 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
908 operatingsystem = 'CentOS'
909 operatingsystemmajrelease = '7'
910 context 'using default - no routing node' do
912 :osfamily => osfamily,
913 :operatingsystem => operatingsystem,
914 :operatingsystemmajrelease => operatingsystemmajrelease,
919 # Run shared tests applicable to all supported OSs
920 # Note that this function is defined in spec_helper
923 # Run test that specialize in checking routing-node config
924 # Note that this function is defined in spec_helper
925 vpp_routing_node_tests
928 context 'using node name for routing node' do
930 :osfamily => osfamily,
931 :operatingsystem => operatingsystem,
932 :operatingsystemmajrelease => operatingsystemmajrelease,
936 :vpp_routing_node => 'test-node-1',
939 # Run shared tests applicable to all supported OSs
940 # Note that this function is defined in spec_helper
943 # Run test that specialize in checking routing-node config
944 # Note that this function is defined in spec_helper
945 vpp_routing_node_tests(routing_node: 'test-node-1')
949 # ODL username/password tests
950 describe 'ODL username/password tests' do
951 # Non-OS-type tests assume CentOS 7
952 # See issue #43 for reasoning:
953 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
955 operatingsystem = 'CentOS'
956 operatingsystemmajrelease = '7'
957 context 'using default username/password' do
959 :osfamily => osfamily,
960 :operatingsystem => operatingsystem,
961 :operatingsystemmajrelease => operatingsystemmajrelease,
966 # Run shared tests applicable to all supported OSs
967 # Note that this function is defined in spec_helper
970 # Run test that specialize in checking username/password config
971 # Note that this function is defined in spec_helper
972 username_password_tests('admin','admin')
975 context 'specifying non-default username/password' do
977 :osfamily => osfamily,
978 :operatingsystem => operatingsystem,
979 :operatingsystemmajrelease => operatingsystemmajrelease,
987 # Run shared tests applicable to all supported OSs
988 # Note that this function is defined in spec_helper
991 # Run test that specialize in checking routing-node config
992 # Note that this function is defined in spec_helper
993 username_password_tests('test', 'test')
997 # websocket address tests
998 describe 'ODL websocket address tests' do
999 # Non-OS-type tests assume CentOS 7
1000 # See issue #43 for reasoning:
1001 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1003 operatingsystem = 'CentOS'
1004 operatingsystemmajrelease = '7'
1005 context 'using default websocket address' do
1007 :osfamily => osfamily,
1008 :operatingsystem => operatingsystem,
1009 :operatingsystemmajrelease => operatingsystemmajrelease,
1014 # Run shared tests applicable to all supported OSs
1015 # Note that this function is defined in spec_helper
1018 # Run test that specialize in checking websocket address
1019 # Note that this function is defined in spec_helper
1020 odl_websocket_address_tests
1023 context 'overriding websocket address' do
1025 :osfamily => osfamily,
1026 :operatingsystem => operatingsystem,
1027 :operatingsystemmajrelease => operatingsystemmajrelease,
1031 :odl_bind_ip => '127.0.0.1'
1034 # Run shared tests applicable to all supported OSs
1035 # Note that this function is defined in spec_helper
1036 generic_tests(odl_bind_ip: '127.0.0.1')
1038 # Run test that specialize in checking websocket address
1039 # Note that this function is defined in spec_helper
1040 odl_websocket_address_tests(odl_bind_ip: '127.0.0.1')
1045 describe 'ODL TLS tests' do
1046 # Non-OS-type tests assume CentOS 7
1047 # See issue #43 for reasoning:
1048 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1050 operatingsystem = 'CentOS'
1051 operatingsystemmajrelease = '7'
1052 context 'enabling TLS without required keystore password (negative test)' do
1054 :osfamily => osfamily,
1055 :operatingsystem => operatingsystem,
1056 :operatingsystemmajrelease => operatingsystemmajrelease,
1060 :enable_tls => :true
1063 # Run test that specialize in checking TLS
1064 # Note that this function is defined in spec_helper
1065 odl_tls_tests(enable_tls:true)
1067 context 'enabling TLS with required params' do
1069 :osfamily => osfamily,
1070 :operatingsystem => operatingsystem,
1071 :operatingsystemmajrelease => operatingsystemmajrelease,
1075 :enable_tls => true,
1076 :tls_keystore_password => '123456',
1079 # Run shared tests applicable to all supported OSs
1080 # Note that this function is defined in spec_helper
1083 # Run test that specialize in checking TLS
1084 # Note that this function is defined in spec_helper
1085 odl_tls_tests(enable_tls:true, tls_keystore_password:'123456')
1089 describe 'polling enablement settings' do
1090 # Non-OS-type tests assume CentOS 7
1091 # See issue #43 for reasoning:
1092 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1094 operatingsystem = 'CentOS'
1095 operatingsystemmajrelease = '7'
1097 # Default statistics polling off
1098 context 'do not poll ovs statistics' do
1100 :osfamily => osfamily,
1101 :operatingsystem => operatingsystem,
1102 :operatingsystemmajrelease => operatingsystemmajrelease,
1107 # Run shared tests applicable to all supported OSs
1108 # Note that this function is defined in spec_helper
1111 # Run test specific to log settings
1112 stats_polling_enablement_tests
1115 # Default statistics polling on
1116 context 'poll ovs statistics' do
1118 :osfamily => osfamily,
1119 :operatingsystem => operatingsystem,
1120 :operatingsystemmajrelease => operatingsystemmajrelease,
1124 :stats_polling_enabled => true,
1127 # Run shared tests applicable to all supported OSs
1128 # Note that this function is defined in spec_helper
1131 # Run test specific to log settings
1132 stats_polling_enablement_tests(stats_polling_enabled:true)
1136 describe 'Different IPv support tests' do
1137 # Non-OS-type tests assume CentOS 7
1138 # See issue #43 for reasoning:
1139 # https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
1141 operatingsystem = 'CentOS'
1142 operatingsystemmajrelease = '7'
1144 context 'IPv6 deployment' do
1146 :osfamily => osfamily,
1147 :operatingsystem => operatingsystem,
1148 :operatingsystemmajrelease => operatingsystemmajrelease,
1152 :odl_bind_ip => '::1'
1155 # Run shared tests applicable to all supported OSs
1156 # Note that this function is defined in spec_helper
1157 generic_tests(odl_bind_ip:'::1')
1160 context 'IPv4 deployment' do
1162 :osfamily => osfamily,
1163 :operatingsystem => operatingsystem,
1164 :operatingsystemmajrelease => operatingsystemmajrelease,
1168 :odl_bind_ip => '127.0.0.1'
1171 # Run shared tests applicable to all supported OSs
1172 # Note that this function is defined in spec_helper
1173 generic_tests(odl_bind_ip:'127.0.0.1')