blob: f32f92692f05bba448703a37daee90422419174e [file] [log] [blame]
Petr Michalec6cf80e52016-07-27 09:46:53 +02001
2# TODO, enable helper files once resolved - https://github.com/chef/kitchen-inspec/issues/93
3#require 'neutron_spec'
4#require 'spec_helper'
5
6neutron = {
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
24control '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
38end
39
40control '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
49end
50