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 # This is the Fedora Yum repo URL
14 yum_repo = 'https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/fedora-$releasever-$basearch/'
16 # All tests for supported versions of Fedora
17 ['20', '21'].each do |operatingsystemmajrelease|
18 context "#{operatingsystemmajrelease}" do
20 :osfamily => osfamily,
21 :operatingsystem => operatingsystem,
22 :operatingsystemmajrelease => operatingsystemmajrelease,
24 # TODO: Call supported-OS-specific tests
29 # All tests for unsupported versions of Fedora
30 ['18', '19', '22'].each do |operatingsystemmajrelease|
31 context "#{operatingsystemmajrelease}" do
33 :osfamily => osfamily,
34 :operatingsystem => operatingsystem,
35 :operatingsystemmajrelease => operatingsystemmajrelease,
37 # Run shared tests applicable to all unsupported OSs
38 # Note that this function is defined in spec_helper
39 unsupported_os_tests("Unsupported OS: #{operatingsystem} #{operatingsystemmajrelease}")
44 # All tests for CentOS
46 operatingsystem = 'CentOS'
48 # This is the CentOS 7 Yum repo URL
49 yum_repo = 'https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/epel-7-$basearch/'
51 # All tests for supported versions of CentOS
52 ['7'].each do |operatingsystemmajrelease|
53 context "#{operatingsystemmajrelease}" do
55 :osfamily => osfamily,
56 :operatingsystem => operatingsystem,
57 :operatingsystemmajrelease => operatingsystemmajrelease,
59 # TODO: Call supported-OS-specific tests
64 # All tests for unsupported versions of CentOS
65 ['5', '6', '8'].each do |operatingsystemmajrelease|
66 context "#{operatingsystemmajrelease}" do
68 :osfamily => osfamily,
69 :operatingsystem => operatingsystem,
70 :operatingsystemmajrelease => operatingsystemmajrelease,
72 # Run shared tests applicable to all unsupported OSs
73 # Note that this function is defined in spec_helper
74 unsupported_os_tests("Unsupported OS: #{operatingsystem} #{operatingsystemmajrelease}")
80 # All tests for unsupported OS families
81 ['Debian', 'Suse', 'Solaris'].each do |osfamily|
82 context "OS family #{osfamily}" do
84 :osfamily => osfamily,
87 # Run shared tests applicable to all unsupported OSs
88 # Note that this function is defined in spec_helper
89 unsupported_os_tests("Unsupported OS family: #{osfamily}")
94 # All Karaf feature tests
95 describe 'Karaf feature tests' do
96 # All Karaf feature tests assume CentOS 7
98 operatingsystem = 'CentOS'
99 operatingsystemmajrelease = '7'
100 # This is the CentOS 7 Yum repo URL
101 yum_repo = 'https://copr-be.cloud.fedoraproject.org/results/dfarrell07/OpenDaylight/epel-7-$basearch/'
102 describe "using default features" do
103 # NB: This list should be the same as the one in opendaylight::params
104 default_features = ['config', 'standard', 'region', 'package', 'kar', 'ssh', 'management']
105 context "and not passing extra features" do
107 :osfamily => osfamily,
108 :operatingsystem => operatingsystem,
109 :operatingsystemmajrelease => operatingsystemmajrelease,
114 # Run shared tests applicable to all supported OSs
115 # Note that this function is defined in spec_helper
116 supported_os_tests(yum_repo, default_features)
119 context "and passing extra features" do
121 :osfamily => osfamily,
122 :operatingsystem => operatingsystem,
123 :operatingsystemmajrelease => operatingsystemmajrelease,
126 # These are real but arbitrarily chosen features
127 extra_features = ["odl-base-all", "odl-ovsdb-all"]
129 :extra_features => extra_features,
132 # Run shared tests applicable to all supported OSs
133 # Note that this function is defined in spec_helper
134 supported_os_tests(yum_repo, default_features + extra_features)
138 describe "overriding default features" do
139 default_features = ["standard", "ssh"]
140 context "and not passing extra features" do
142 :osfamily => osfamily,
143 :operatingsystem => operatingsystem,
144 :operatingsystemmajrelease => operatingsystemmajrelease,
149 :default_features => default_features,
152 # Run shared tests applicable to all supported OSs
153 # Note that this function is defined in spec_helper
154 supported_os_tests(yum_repo, default_features)
157 context "and passing extra features" do
159 :osfamily => osfamily,
160 :operatingsystem => operatingsystem,
161 :operatingsystemmajrelease => operatingsystemmajrelease,
164 # These are real but arbitrarily chosen features
165 extra_features = ["odl-base-all", "odl-ovsdb-all"]
167 :default_features => default_features,
168 :extra_features => extra_features,
171 # Run shared tests applicable to all supported OSs
172 # Note that this function is defined in spec_helper
173 supported_os_tests(yum_repo, default_features + extra_features)