1 require 'beaker-rspec/spec_helper'
2 require 'beaker-rspec/helpers/serverspec'
3 require 'beaker-puppet'
5 include Beaker::DSL::InstallUtils::FOSSUtils
6 include Beaker::DSL::InstallUtils::ModuleUtils
7 include Beaker::DSL::Helpers::PuppetHelpers
9 # Install Puppet on all Beaker hosts
10 unless ENV['BEAKER_provision'] == 'no'
13 install_puppet_agent_on(host, {:puppet_collection => "pc1"})
17 RSpec.configure do |c|
19 proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
21 # Readable test descriptions
22 c.formatter = :documentation
24 # Configure all nodes in nodeset
26 # Install opendaylight module on any/all Beaker hosts
27 # TODO: Should this be done in host.each loop?
28 puppet_module_install(:source => proj_root, :module_name => 'opendaylight')
30 # Install stdlib, a dependency of the odl mod
31 on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0] }
32 # Install apt, a dependency of the deb install method
33 on host, puppet('module', 'install', 'puppetlabs-apt'), { :acceptable_exit_codes => [0] }
39 # NB: These are a library of helper fns used by the Beaker tests
42 # NB: There are a large number of helper functions used in these tests.
43 # They make this code much more friendly, but may need to be referenced.
44 # The serverspec helpers (`should`, `be_running`...) are documented here:
45 # http://serverspec.org/resource_types.html
47 def install_odl(options = {})
48 # Install params are passed via environment var, set in Rakefile
49 # Changing the installed version of ODL via `puppet apply` is not supported
50 # by puppet-odl, so it's not possible to vary these params in the same
51 # Beaker test run. Do a different run passing different env vars.
52 rpm_repo = ENV['RPM_REPO']
53 deb_repo = ENV['DEB_REPO']
55 # NB: These param defaults should match the ones used by the opendaylight
56 # class, which are defined in opendaylight::params
57 # TODO: Remove this possible source of bugs^^
58 # Extract params if given, defaulting to odl class defaults if not
59 extra_features = options.fetch(:extra_features, ['odl-restconf'])
60 default_features = options.fetch(:default_features, ['standard', 'wrap', 'ssh'])
61 odl_rest_port = options.fetch(:odl_rest_port, 8181)
62 odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
63 log_levels = options.fetch(:log_levels, {})
64 enable_ha = options.fetch(:enable_ha, false)
65 ha_node_ips = options.fetch(:ha_node_ips, [])
66 ha_node_index = options.fetch(:ha_node_index, 0)
67 ha_db_modules = options.fetch(:ha_db_modules, { 'default' => false })
68 username = options.fetch(:username, 'admin')
69 password = options.fetch(:password, 'admin')
70 log_max_size = options.fetch(:log_max_size, '10GB')
71 log_max_rollover = options.fetch(:log_max_rollover, 2)
72 log_rollover_fileindex = options.fetch(:log_rollover_fileindex, 'min')
73 snat_mechanism = options.fetch(:snat_mechanism, 'controller')
74 enable_tls = options.fetch(:enable_tls, false)
75 tls_keystore_password = options.fetch(:tls_keystore_password, 'dummypass')
76 log_mechanism = options.fetch(:log_mechanism, 'file')
77 inherit_dscp_marking = options.fetch(:inherit_dscp_marking, false)
78 stats_polling_enabled = options.fetch(:stats_polling_enabled, false)
80 # Build script for consumption by Puppet apply
81 it 'should work idempotently with no errors' do
83 class { 'opendaylight':
84 rpm_repo => '#{rpm_repo}',
85 deb_repo => '#{deb_repo}',
86 default_features => #{default_features},
87 extra_features => #{extra_features},
88 odl_rest_port => #{odl_rest_port},
89 odl_bind_ip => '#{odl_bind_ip}',
90 enable_ha => #{enable_ha},
91 ha_node_ips => #{ha_node_ips},
92 ha_node_index => #{ha_node_index},
93 ha_db_modules => #{ha_db_modules},
94 log_levels => #{log_levels},
95 username => #{username},
96 password => #{password},
97 log_max_size => '#{log_max_size}',
98 log_max_rollover => #{log_max_rollover},
99 log_rollover_fileindex => #{log_rollover_fileindex},
100 snat_mechanism => #{snat_mechanism},
101 enable_tls => #{enable_tls},
102 tls_keystore_password => #{tls_keystore_password},
103 log_mechanism => #{log_mechanism},
104 inherit_dscp_marking => #{inherit_dscp_marking},
105 stats_polling_enabled => #{stats_polling_enabled},
109 # Apply our Puppet manifest on the Beaker host
110 apply_manifest(pp, :catch_failures => true)
112 # Not checking for idempotence because of false failures
113 # related to package manager cache updates outputting to
114 # stdout and different IDs for the puppet manifest apply.
115 # I think this is a limitation in how Beaker can check
116 # for changes, not a problem with the Puppet module.
120 # Shared function that handles generic validations
121 # These should be common for all odl class param combos
122 def generic_validations(options = {})
123 java_opts = options.fetch(:java_opts, [])
124 # Verify ODL's directory
125 describe file('/opt/opendaylight/') do
126 it { should be_directory }
127 it { should be_owned_by 'odl' }
128 it { should be_grouped_into 'odl' }
131 # Verify ODL's systemd service
132 describe service('opendaylight') do
133 it { should be_enabled }
134 it { should be_enabled.with_level(3) }
135 it { should be_running.under('systemd') }
138 # Creation handled by RPM or Deb
139 describe user('odl') do
141 it { should belong_to_group 'odl' }
142 # NB: This really shouldn't have a slash at the end!
143 # The home dir set by the RPM is `/opt/opendaylight`.
144 # Since we use the trailing slash elsewhere else, this
145 # may look like a style issue. It isn't! It will make
146 # Beaker tests fail if it ends with a `/`. A future
147 # version of the ODL RPM may change this.
148 it { should have_home_directory '/opt/opendaylight' }
151 # Creation handled by RPM or Deb
152 describe group('odl') do
156 # This should not be the odl user's home dir
157 describe file('/home/odl') do
158 # Home dir shouldn't be created for odl user
159 it { should_not be_directory }
162 # OpenDaylight will appear as a Java process
163 describe process('java') do
164 it { should be_running }
167 # Should contain Karaf features config file
168 describe file('/opt/opendaylight/etc/org.apache.karaf.features.cfg') do
169 it { should be_file }
170 it { should be_owned_by 'odl' }
171 it { should be_grouped_into 'odl' }
174 odl_bind_ip = options.fetch(:odl_bind_ip, '127.0.0.1')
175 if odl_bind_ip == '127.0.0.1'
176 java_options = ['-Djava.net.preferIPv4Stack=true'] + java_opts
178 java_options = ['-Djava.net.preferIPv6Addresses=true'] + java_opts
181 # Should contain karaf file with Java options set
182 describe file('/opt/opendaylight/bin/karaf') do
183 it { should be_file }
184 it { should be_owned_by 'odl' }
185 it { should be_grouped_into 'odl' }
186 its(:content) { should match /^EXTRA_JAVA_OPTS=#{java_options.join(" ")}/ }
189 # Should contain ODL NB port config file
190 describe file('/opt/opendaylight/etc/jetty.xml') do
191 it { should be_file }
192 it { should be_owned_by 'odl' }
193 it { should be_grouped_into 'odl' }
196 # Should contain log level config file
197 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
198 it { should be_file }
199 it { should be_owned_by 'odl' }
200 it { should be_grouped_into 'odl' }
203 if ['centos-7', 'centos-7-docker'].include? ENV['RS_SET']
204 # Validations for modern Red Hat family OSs
206 # Verify ODL systemd .service file
207 describe file('/usr/lib/systemd/system/opendaylight.service') do
208 it { should be_file }
209 it { should be_owned_by 'root' }
210 it { should be_grouped_into 'root' }
211 it { should be_mode '644' }
214 # Java 8 should be installed
215 describe package('java-1.8.0-openjdk') do
216 it { should be_installed }
219 # Ubuntu 16.04 specific validation
220 elsif ['ubuntu-16', 'ubuntu-16-docker'].include? ENV['RS_SET']
222 # Verify ODL systemd .service file
223 describe file('/lib/systemd/system/opendaylight.service') do
224 it { should be_file }
225 it { should be_owned_by 'root' }
226 it { should be_grouped_into 'root' }
227 it { should be_mode '644' }
230 # Java 8 should be installed
231 describe package('openjdk-8-jre-headless') do
232 it { should be_installed }
236 fail("Unexpected RS_SET (host OS): #{ENV['RS_SET']}")
240 # Shared function for validations related to log file settings
241 def log_settings_validations(options = {})
242 # Should contain log level config file with correct file size and rollover values
243 log_max_size = options.fetch(:log_max_size, '10GB')
244 log_max_rollover = options.fetch(:log_max_rollover, 2)
245 log_rollover_fileindex = options.fetch(:log_rollover_fileindex, 'min')
246 log_mechanism = options.fetch(:log_mechanism, 'file')
248 if log_mechanism == 'console'
249 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
250 it { should be_file }
251 it { should be_owned_by 'odl' }
252 it { should be_grouped_into 'odl' }
253 its(:content) { should match /^karaf.log.console=INFO/ }
254 its(:content) { should match /^log4j2.appender.console.direct = true/ }
257 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
258 it { should be_file }
259 it { should be_owned_by 'odl' }
260 it { should be_grouped_into 'odl' }
261 its(:content) { should match /^log4j2.appender.rolling.policies.size.size = #{log_max_size}/ }
262 its(:content) { should match /^log4j2.appender.rolling.strategy.type = DefaultRolloverStrategy/ }
263 its(:content) { should match /^log4j2.appender.rolling.strategy.max = #{log_max_rollover}/ }
264 its(:content) { should match /^log4j2.appender.rolling.strategy.fileIndex = #{log_rollover_fileindex}/ }
269 # Shared function for validations related to the Karaf config file
270 def karaf_config_validations(options = {})
271 # NB: These param defaults should match the ones used by the opendaylight
272 # class, which are defined in opendaylight::params
273 # TODO: Remove this possible source of bugs^^
274 extra_features = options.fetch(:extra_features, [])
275 default_features = options.fetch(:default_features, ['standard', 'wrap', 'ssh'])
277 # Create one list of all of the features
278 features = default_features + extra_features
280 describe file('/opt/opendaylight/etc/org.apache.karaf.features.cfg') do
281 it { should be_file }
282 it { should be_owned_by 'odl' }
283 it { should be_grouped_into 'odl' }
284 its(:content) { should match /^featuresBoot=#{features.join(",")}/ }
288 # Shared function for validations related to the ODL REST port config file
289 def port_config_validations(options = {})
290 # NB: This param default should match the one used by the opendaylight
291 # class, which is defined in opendaylight::params
292 # TODO: Remove this possible source of bugs^^
293 odl_rest_port = options.fetch(:odl_rest_port, 8181)
295 describe file('/opt/opendaylight/etc/jetty.xml') do
296 it { should be_file }
297 it { should be_owned_by 'odl' }
298 it { should be_grouped_into 'odl' }
299 its(:content) { should match /Property name="jetty.port" default="#{odl_rest_port}"/ }
302 describe file('/opt/opendaylight/etc/org.ops4j.pax.web.cfg') do
303 it { should be_file }
304 it { should be_owned_by 'odl' }
305 it { should be_grouped_into 'odl' }
306 its(:content) { should match /org.osgi.service.http.port = #{odl_rest_port}/ }
310 # Shared function for validations related to the ODL bind IP
311 def odl_bind_ip_validation(options = {})
312 # NB: This param default should match the one used by the opendaylight
313 # class, which is defined in opendaylight::params
314 # TODO: Remove this possible source of bugs^^
315 odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
317 if odl_bind_ip != '0.0.0.0'
318 describe file('/opt/opendaylight/etc/org.apache.karaf.shell.cfg') do
319 it { should be_file }
320 it { should be_owned_by 'odl' }
321 it { should be_grouped_into 'odl' }
322 its(:content) { should match /sshHost = #{odl_bind_ip}/ }
325 describe file('/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg') do
326 it { should be_file }
327 it { should be_owned_by 'odl' }
328 it { should be_grouped_into 'odl' }
329 its(:content) { should match /ovsdb-listener-ip = #{odl_bind_ip}/ }
332 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml') do
333 it { should be_file }
334 it { should be_owned_by 'odl' }
335 it { should be_grouped_into 'odl' }
336 its(:content) { should match /<address>#{odl_bind_ip}<\/address>/ }
339 describe command("loop_count=0; until [[ \$loop_count -ge 30 ]]; do netstat -punta | grep 8101 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
340 its(:exit_status) { should eq 0 }
343 describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6653 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
344 its(:exit_status) { should eq 0 }
347 describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6640 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
348 its(:exit_status) { should eq 0 }
353 # Shared function for validations related to custom logging verbosity
354 def log_level_validations(options = {})
355 # NB: This param default should match the one used by the opendaylight
356 # class, which is defined in opendaylight::params
357 # TODO: Remove this possible source of bugs^^
358 log_levels = options.fetch(:log_levels, {})
361 # Should contain log level config file
362 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
363 it { should be_file }
364 it { should be_owned_by 'odl' }
365 it { should be_grouped_into 'odl' }
368 # Should contain log level config file
369 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
370 it { should be_file }
371 it { should be_owned_by 'odl' }
372 it { should be_grouped_into 'odl' }
374 # Verify each custom log level config entry
375 log_levels.each_pair do |logger, level|
376 underscored_version = "#{logger}".gsub('.', '_')
377 describe file('/opt/opendaylight/etc/org.ops4j.pax.logging.cfg') do
378 it { should be_file }
379 it { should be_owned_by 'odl' }
380 it { should be_grouped_into 'odl' }
381 its(:content) { should match /^log4j2.logger.#{underscored_version}.level = #{level}/ }
382 its(:content) { should match /^log4j2.logger.#{underscored_version}.name = #{logger}/ }
388 # Shared function for validations related to ODL OVSDB HA config
389 def enable_ha_validations(options = {})
390 # NB: This param default should match the one used by the opendaylight
391 # class, which is defined in opendaylight::params
392 # TODO: Remove this possible source of bugs^^
393 enable_ha = options.fetch(:enable_ha, false)
394 ha_node_ips = options.fetch(:ha_node_ips, [])
395 odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
396 ha_db_modules = options.fetch(:ha_db_modules, { 'default' => false })
398 ha_node_count = ha_node_ips.size
400 if (enable_ha) && (ha_node_count < 2)
401 # Check for HA_NODE_COUNT < 2
402 fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
406 ha_node_index = ha_node_ips.index(odl_bind_ip)
407 describe file('/opt/opendaylight/configuration/initial/akka.conf') do
408 it { should be_file }
409 it { should be_owned_by 'odl' }
410 it { should be_grouped_into 'odl' }
411 its(:content) { should match /roles\s*=\s*\["member-#{ha_node_index}"\]/ }
414 ha_db_modules.each do |mod, urn|
415 describe file('/opt/opendaylight/configuration/initial/module-shards.conf') do
416 it { should be_file }
417 it { should be_owned_by 'odl' }
418 it { should be_grouped_into 'odl' }
419 its(:content) { should match /name = "#{mod}"/ }
423 describe file('/opt/opendaylight/configuration/initial/modules.conf') do
424 it { should be_file }
425 it { should be_owned_by 'odl' }
426 it { should be_grouped_into 'odl' }
429 describe file('/opt/opendaylight/configuration/initial/modules.conf') do
430 it { should be_file }
431 it { should be_owned_by 'odl' }
432 it { should be_grouped_into 'odl' }
433 its(:content) { should match /name = "#{mod}"/ }
434 its(:content) { should match /namespace = "#{urn}"/ }
441 # Shared function that handles validations specific to RPM-type installs
442 def rpm_validations()
443 rpm_repo = ENV['RPM_REPO']
445 describe yumrepo('opendaylight') do
447 it { should be_enabled }
450 describe package('opendaylight') do
451 it { should be_installed }
455 # Shared function that handles validations specific to Deb-type installs
456 def deb_validations()
457 deb_repo = ENV['DEB_REPO']
459 # Docs: http://serverspec.org/resource_types.html#ppa
460 describe ppa(deb_repo) do
462 it { should be_enabled }
465 describe package('opendaylight') do
466 it { should be_installed }
470 # Shared function for validations related to username/password
471 def username_password_validations(options = {})
472 # NB: This param default should match the one used by the opendaylight
473 # class, which is defined in opendaylight::params
474 # TODO: Remove this possible source of bugs^^
475 odl_username = options.fetch(:username, 'admin')
476 odl_password = options.fetch(:password, 'admin')
477 odl_check_url = 'http://127.0.0.1:8181/restconf'
479 describe file('/opt/opendaylight/data/idmlight.db.mv.db') do
480 it { should be_file }
483 describe command("loop_count=0; until [[ \$loop_count -ge 300 ]]; do curl -o /dev/null --fail --silent --head -u #{odl_username}:#{odl_password} #{odl_check_url} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds for ODL to become active\"") do
484 its(:exit_status) { should eq 0 }
487 describe command("curl -o /dev/null --fail --silent --head -u #{odl_username}:#{odl_password} #{odl_check_url}") do
488 its(:exit_status) { should eq 0 }
492 # Shared function for validations related to the SNAT config file
493 def snat_mechanism_validations(options = {})
494 # NB: This param default should match the one used by the opendaylight
495 # class, which is defined in opendaylight::params
496 # TODO: Remove this possible source of bugs^^
497 snat_mechanism = options.fetch(:snat_mechanism, 'controller')
499 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-natservice-config.xml') do
500 it { should be_file }
501 it { should be_owned_by 'odl' }
502 it { should be_grouped_into 'odl' }
503 its(:content) { should match /<nat-mode>#{snat_mechanism}<\/nat-mode>/ }
507 # Shared function for validations related to SFC
508 def sfc_validations(options = {})
509 # NB: This param default should match the one used by the opendaylight
510 # class, which is defined in opendaylight::params
511 # TODO: Remove this possible source of bugs^^
513 extra_features = options.fetch(:extra_features, [])
514 if extra_features.include? 'odl-netvirt-sfc'
520 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/genius-itm-config.xml') do
521 it { should be_file }
522 it { should be_owned_by 'odl' }
523 it { should be_grouped_into 'odl' }
524 its(:content) { should match /<gpe-extension-enabled>#{sfc_enabled}<\/gpe-extension-enabled>/ }
528 # Shared function for validations related to tos value for DSCP marking
529 def dscp_validations(options = {})
530 # NB: This param default should match the one used by the opendaylight
531 # class, which is defined in opendaylight::params
532 # TODO: Remove this possible source of bugs^^
534 inherit_dscp_marking = options.fetch(:inherit_dscp_marking, false)
536 if inherit_dscp_marking
537 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/genius-itm-config.xml') do
538 it { should be_file }
539 it { should be_owned_by 'odl' }
540 it { should be_grouped_into 'odl' }
541 its(:content) { should match /<default-tunnel-tos>inherit<\/default-tunnel-tos>/ }
546 def websocket_address_validations(options = {})
547 # NB: This param default should match the one used by the opendaylight
548 # class, which is defined in opendaylight::params
549 # TODO: Remove this possible source of bugs^^
550 odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
552 if not odl_bind_ip.eql? '0.0.0.0'
553 describe file('/opt/opendaylight/etc/org.opendaylight.restconf.cfg') do
554 it { should be_file }
555 it { should be_owned_by 'odl' }
556 it { should be_grouped_into 'odl' }
557 its(:content) { should match /^websocket-address=#{odl_bind_ip}/ }
560 describe file('/opt/opendaylight/etc/org.opendaylight.restconf.cfg') do
561 it { should be_file }
566 def tls_validations(options = {})
567 # NB: This param default should match the one used by the opendaylight
568 # class, which is defined in opendaylight::params
569 # TODO: Remove this possible source of bugs^^
570 tls_keystore_password = options.fetch(:tls_keystore_password)
571 odl_rest_port = options.fetch(:odl_rest_port, 8181)
573 describe file('/opt/opendaylight/etc/org.ops4j.pax.web.cfg') do
574 it { should be_file }
575 it { should be_owned_by 'odl' }
576 it { should be_grouped_into 'odl' }
577 its(:content) { should match /org.osgi.service.http.port.secure = #{odl_rest_port}/ }
578 its(:content) { should match /org.ops4j.pax.web.ssl.keystore = configuration\/ssl\/ctl.jks/ }
579 its(:content) { should match /org.ops4j.pax.web.ssl.password = #{tls_keystore_password}/ }
580 its(:content) { should match /org.ops4j.pax.web.ssl.keypassword = #{tls_keystore_password}/ }
581 its(:content) { should match /org.osgi.service.http.secure.enabled = true/ }
582 its(:content) { should match /org.osgi.service.http.enabled = false/ }
585 describe file('/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg') do
586 it { should be_file }
587 it { should be_owned_by 'odl' }
588 it { should be_grouped_into 'odl' }
589 its(:content) { should match /use-ssl = true/ }
592 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml') do
593 it { should be_file }
594 it { should be_owned_by 'odl' }
595 it { should be_grouped_into 'odl' }
596 its(:content) { should match /<keystore-password>#{tls_keystore_password}<\/keystore-password>/ }
597 its(:content) { should match /<truststore-password>#{tls_keystore_password}<\/truststore-password>/ }
598 its(:content) { should match /<transport-protocol>TLS<\/transport-protocol>/ }
601 describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/aaa-cert-config.xml') do
602 it { should be_file }
603 it { should be_owned_by 'odl' }
604 it { should be_grouped_into 'odl' }
605 its(:content) { should match /<store-password>#{tls_keystore_password}<\/store-password>/ }
606 its(:content) { should match /<use-mdsal>false<\/use-mdsal>/ }
609 describe file('/opt/opendaylight/etc/jetty.xml') do
610 it { should be_file }
611 it { should be_owned_by 'odl' }
612 it { should be_grouped_into 'odl' }
613 its(:content) { should match /<Property name="jetty.secure.port" default="#{odl_rest_port}" \/>/ }
617 # Shared function for validations related to OVS statistics polling
618 def stats_polling_validations(options = {})
619 # NB: This param default should match the one used by the opendaylight
620 # class, which is defined in opendaylight::params
621 # TODO: Remove this possible source of bugs^^
623 stats_polling_enabled = options.fetch(:stats_polling_enabled, false)
624 describe file('/opt/opendaylight/etc/org.opendaylight.openflowplugin.cfg') do
625 it { should be_file }
626 it { should be_owned_by 'odl' }
627 it { should be_grouped_into 'odl' }
628 its(:content) { should match /is-statistics-polling-on=#{stats_polling_enabled}/ }