summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2018-08-03 06:21:11 -0700
committerSamuel Cassiba <s@cassiba.com>2018-08-03 06:39:18 -0700
commit681a71fb3303e03c98365b10e3b0bbbcdf7dfd16 (patch)
tree607b57347b052b7e5fc18393f295580c387a55eb /spec
parentb27c620954c5fd2f484c112d86be7040ae2d7732 (diff)
starting rocky development patch
Notes
Notes (review): Code-Review+2: Samuel Cassiba <samuel@cassi.ba> Workflow+1: Samuel Cassiba <samuel@cassi.ba> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 04 Aug 2018 05:13:18 +0000 Reviewed-on: https://review.openstack.org/588551 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
Diffstat (limited to 'spec')
-rw-r--r--spec/api_spec.rb2
-rw-r--r--spec/backup-redhat_spec.rb2
-rw-r--r--spec/cinder_common_spec.rb14
-rw-r--r--spec/identity_registration_spec.rb2
-rw-r--r--spec/spec_helper.rb4
-rw-r--r--spec/volume_spec.rb2
6 files changed, 13 insertions, 13 deletions
diff --git a/spec/api_spec.rb b/spec/api_spec.rb
index 13f9897..81a40d6 100644
--- a/spec/api_spec.rb
+++ b/spec/api_spec.rb
@@ -31,7 +31,7 @@ describe 'openstack-block-storage::api' do
31 expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json') 31 expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')
32 end 32 end
33 describe 'policy file specified' do 33 describe 'policy file specified' do
34 before { node.set['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' } 34 before { node.override['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' }
35 let(:remote_policy) { chef_run.remote_file('/etc/cinder/policy.json') } 35 let(:remote_policy) { chef_run.remote_file('/etc/cinder/policy.json') }
36 36
37 it 'manages policy file when remote file is specified' do 37 it 'manages policy file when remote file is specified' do
diff --git a/spec/backup-redhat_spec.rb b/spec/backup-redhat_spec.rb
index 7fc940b..a06bbe1 100644
--- a/spec/backup-redhat_spec.rb
+++ b/spec/backup-redhat_spec.rb
@@ -14,7 +14,7 @@ describe 'openstack-block-storage::backup' do
14 14
15 describe 'enable cinder backup service' do 15 describe 'enable cinder backup service' do
16 before do 16 before do
17 node.set['openstack']['block-storage']['backup']['enabled'] = true 17 node.override['openstack']['block-storage']['backup']['enabled'] = true
18 end 18 end
19 19
20 it 'starts cinder backup' do 20 it 'starts cinder backup' do
diff --git a/spec/cinder_common_spec.rb b/spec/cinder_common_spec.rb
index 5182cd9..03fb06d 100644
--- a/spec/cinder_common_spec.rb
+++ b/spec/cinder_common_spec.rb
@@ -9,8 +9,8 @@ describe 'openstack-block-storage::cinder-common' do
9 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 9 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
10 let(:node) { runner.node } 10 let(:node) { runner.node }
11 let(:chef_run) do 11 let(:chef_run) do
12 node.set['openstack']['mq']['host'] = '127.0.0.1' 12 node.override['openstack']['mq']['host'] = '127.0.0.1'
13 node.set['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic' 13 node.override['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic'
14 14
15 runner.converge(described_recipe) 15 runner.converge(described_recipe)
16 end 16 end
@@ -94,7 +94,7 @@ describe 'openstack-block-storage::cinder-common' do
94 94
95 context 'syslog use' do 95 context 'syslog use' do
96 it 'sets the log_config value when syslog is in use' do 96 it 'sets the log_config value when syslog is in use' do
97 node.set['openstack']['block-storage']['syslog']['use'] = true 97 node.override['openstack']['block-storage']['syslog']['use'] = true
98 98
99 expect(chef_run).to render_file(file.name) 99 expect(chef_run).to render_file(file.name)
100 .with_content(%r{^log_config = /etc/openstack/logging.conf$}) 100 .with_content(%r{^log_config = /etc/openstack/logging.conf$})
@@ -131,7 +131,7 @@ describe 'openstack-block-storage::cinder-common' do
131 context 'rabbitmq as mq service' do 131 context 'rabbitmq as mq service' do
132 context 'non ha attributes' do 132 context 'non ha attributes' do
133 before do 133 before do
134 node.set['openstack']['mq']['block-storage']['rabbit']['ha'] = false 134 node.override['openstack']['mq']['block-storage']['rabbit']['ha'] = false
135 end 135 end
136 136
137 it 'does not have a rabbit_hosts attribute' do 137 it 'does not have a rabbit_hosts attribute' do
@@ -142,14 +142,14 @@ describe 'openstack-block-storage::cinder-common' do
142 142
143 context 'lvm settings' do 143 context 'lvm settings' do
144 before do 144 before do
145 node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver' 145 node.override['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
146 end 146 end
147 end 147 end
148 148
149 context 'commonly named volume attributes' do 149 context 'commonly named volume attributes' do
150 %w(iscsi_ip_address iscsi_port iscsi_helper volumes_dir).each do |attr| 150 %w(iscsi_ip_address iscsi_port iscsi_helper volumes_dir).each do |attr|
151 it "has volume related #{attr} attribute" do 151 it "has volume related #{attr} attribute" do
152 node.set['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value" 152 node.override['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value"
153 expect(chef_run).to render_file(file.name).with_content(/^#{attr} = common_volume_#{attr}_value$/) 153 expect(chef_run).to render_file(file.name).with_content(/^#{attr} = common_volume_#{attr}_value$/)
154 end 154 end
155 end 155 end
@@ -157,7 +157,7 @@ describe 'openstack-block-storage::cinder-common' do
157 157
158 context 'netapp ISCSI settings' do 158 context 'netapp ISCSI settings' do
159 before do 159 before do
160 node.set['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver' 160 node.override['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver'
161 end 161 end
162 end 162 end
163 end 163 end
diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb
index f53ad31..ff45034 100644
--- a/spec/identity_registration_spec.rb
+++ b/spec/identity_registration_spec.rb
@@ -84,7 +84,7 @@ describe 'openstack-block-storage::identity_registration' do
84 end 84 end
85 85
86 it 'with custom region override' do 86 it 'with custom region override' do
87 node.set['openstack']['block-storage']['region'] = 'volumeRegion' 87 node.override['openstack']['block-storage']['region'] = 'volumeRegion'
88 expect(chef_run).to create_openstack_endpoint( 88 expect(chef_run).to create_openstack_endpoint(
89 service_type 89 service_type
90 ).with(region: 'volumeRegion') 90 ).with(region: 'volumeRegion')
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 40f131f..5a04965 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -64,7 +64,7 @@ end
64shared_examples 'common-logging' do 64shared_examples 'common-logging' do
65 context 'when syslog.use is true' do 65 context 'when syslog.use is true' do
66 before do 66 before do
67 node.set['openstack']['block-storage']['syslog']['use'] = true 67 node.override['openstack']['block-storage']['syslog']['use'] = true
68 end 68 end
69 69
70 it 'runs logging recipe if node attributes say to' do 70 it 'runs logging recipe if node attributes say to' do
@@ -74,7 +74,7 @@ shared_examples 'common-logging' do
74 74
75 context 'when syslog.use is false' do 75 context 'when syslog.use is false' do
76 before do 76 before do
77 node.set['openstack']['block-storage']['syslog']['use'] = false 77 node.override['openstack']['block-storage']['syslog']['use'] = false
78 end 78 end
79 79
80 it 'runs logging recipe if node attributes say to' do 80 it 'runs logging recipe if node attributes say to' do
diff --git a/spec/volume_spec.rb b/spec/volume_spec.rb
index 90e6a38..24a0fb5 100644
--- a/spec/volume_spec.rb
+++ b/spec/volume_spec.rb
@@ -60,7 +60,7 @@ describe 'openstack-block-storage::volume' do
60 end 60 end
61 61
62 it 'has ubuntu include' do 62 it 'has ubuntu include' do
63 node.set['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value' 63 node.override['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
64 64
65 expect(chef_run).to render_file(file.name).with_content('include /etc/tgt/conf.d/*.conf') 65 expect(chef_run).to render_file(file.name).with_content('include /etc/tgt/conf.d/*.conf')
66 expect(chef_run).not_to render_file(file.name).with_content('include volumes_dir_value/*') 66 expect(chef_run).not_to render_file(file.name).with_content('include volumes_dir_value/*')