Petr Michalec | 6cf80e5 | 2016-07-27 09:46:53 +0200 | [diff] [blame^] | 1 | |
| 2 | # TODO, enable helper files once resolved - https://github.com/chef/kitchen-inspec/issues/93 |
| 3 | #require 'neutron_spec' |
| 4 | #require 'spec_helper' |
| 5 | |
| 6 | neutron = { |
| 7 | user: 'root', |
| 8 | group: 'neutron', |
| 9 | } |
| 10 | |
| 11 | # TODO, pay attention/fix the cfg file ownership |
| 12 | # -rw-r--r-- 1 root neutron 1017 Jun 18 2015 api-paste.ini |
| 13 | # -rw-r--r-- 1 root neutron 109 Jun 18 2015 fwaas_driver.ini |
| 14 | # -rw-r--r-- 1 root neutron 3109 Jun 18 2015 l3_agent.ini |
| 15 | # -rw-r--r-- 1 root root 1400 Jun 18 2015 lbaas_agent.ini |
| 16 | # -rw-r--r-- 1 root neutron 17867 Mar 9 18:42 neutron.conf |
| 17 | # drwxr-xr-x 3 root neutron 4096 Jul 8 06:37 plugins/ |
| 18 | # -rw-r--r-- 1 root neutron 5858 Jun 18 2015 policy.json |
| 19 | # -rw-r--r-- 1 root root 1216 Jun 18 2015 rootwrap.conf |
| 20 | # drwxr-xr-x 2 root root 4096 Jul 8 06:38 rootwrap.d/ |
| 21 | # -rw-r--r-- 1 root neutron 526 Jun 18 2015 vpn_agent.ini |
| 22 | |
| 23 | # TODO, replace with shared controls |
| 24 | control 'neutron control' do |
| 25 | describe file('/etc/neutron/neutron.conf') do |
| 26 | it { should exist } |
| 27 | it { should be_owned_by neutron[:user] } |
| 28 | it { should be_grouped_into neutron[:group] } |
| 29 | end |
| 30 | |
| 31 | describe file('/var/log/neutron') do |
| 32 | it { should be_directory } |
| 33 | end |
| 34 | |
| 35 | describe file('/var/lib/neutron') do |
| 36 | it { should be_directory } |
| 37 | end |
| 38 | end |
| 39 | |
| 40 | control 'neutron control single' do |
| 41 | describe file('/etc/neutron/neutron.conf') do |
| 42 | its ('content') { should match('^core_plugin = neutron_plugin_contrail.plugins.opencontrail.contrail_plugin.NeutronPluginContrailCore')} |
| 43 | its ('content') { should match('^vif_types = vrouter')} |
| 44 | end |
| 45 | |
| 46 | describe file('/etc/neutron/plugins/ml2') do |
| 47 | it { should be_directory } |
| 48 | end |
| 49 | end |
| 50 | |