summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLan Qi song <lqslan@cn.ibm.com>2015-07-22 15:21:28 +0800
committerLan Qi song <lqslan@cn.ibm.com>2015-07-25 09:19:44 +0800
commit7f980745eb103fc2f4f61833a0353cb9fb06045f (patch)
tree4881bb3efba94d0fe18919270b995f29bf93c402 /spec
parent5140ba531dcb0368b141813aa6cc88ead5de6387 (diff)
Create mount point directory when use multi backend configuration
Currently, when we use GPFSDriver as multi backend volume driver, cookbook won't create gpfs mount point base directory automatically. This patch fix this problem. Closes-Bug: #1476960 Change-Id: I1faf33470747fac6df66854470cf45d35a38f3c1
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Mark Vanderwiel <vanderwl@us.ibm.com> Code-Review+2: Ma Wen Cheng <wenchma@cn.ibm.com> Workflow+1: Ma Wen Cheng <wenchma@cn.ibm.com> Submitted-by: Jenkins Submitted-at: Tue, 28 Jul 2015 19:18:29 +0000 Reviewed-on: https://review.openstack.org/204471 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
Diffstat (limited to 'spec')
-rw-r--r--spec/volume-redhat_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/volume-redhat_spec.rb b/spec/volume-redhat_spec.rb
index c77278a..0e66baa 100644
--- a/spec/volume-redhat_spec.rb
+++ b/spec/volume-redhat_spec.rb
@@ -110,6 +110,17 @@ describe 'openstack-block-storage::volume' do
110 @chef_run = ::ChefSpec::SoloRunner.new ::REDHAT_OPTS do |n| 110 @chef_run = ::ChefSpec::SoloRunner.new ::REDHAT_OPTS do |n|
111 n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.ibm.gpfs.GPFSDriver' 111 n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.ibm.gpfs.GPFSDriver'
112 n.set['openstack']['block-storage']['gpfs']['gpfs_mount_point_base'] = 'volumes' 112 n.set['openstack']['block-storage']['gpfs']['gpfs_mount_point_base'] = 'volumes'
113 n.set['openstack']['block-storage']['volume']['multi_backend'] =
114 {
115 'gpfs01' => {
116 'gpfs_mount_point_base' => 'gpfs_volume01',
117 'volume_driver' => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver'
118 },
119 'gpfs02' => {
120 'gpfs_mount_point_base' => 'gpfs_volume02',
121 'volume_driver' => 'cinder.volume.drivers.ibm.gpfs.GPFSDriver'
122 }
123 }
113 end 124 end
114 125
115 @conf = '/etc/cinder/cinder.conf' 126 @conf = '/etc/cinder/cinder.conf'
@@ -160,6 +171,19 @@ describe 'openstack-block-storage::volume' do
160 mode: '0755' 171 mode: '0755'
161 ) 172 )
162 end 173 end
174
175 it 'verifies mount point base is created in multi backend case' do
176 expect(@chef_run).to create_directory('gpfs_volume01').with(
177 owner: 'cinder',
178 group: 'cinder',
179 mode: '0755'
180 )
181 expect(@chef_run).to create_directory('gpfs_volume02').with(
182 owner: 'cinder',
183 group: 'cinder',
184 mode: '0755'
185 )
186 end
163 end 187 end
164 188
165 describe 'create_vg' do 189 describe 'create_vg' do