 d0ce1d6c57
			
		
	
	d0ce1d6c57
	
	
	
		
			
			* new template with attributes for values * Allow use of Common databags, deprecated swift databag * update banners in all templates * update specs This is another patch on the road to bringing the swift cookbook up to speed with the latest Common functions and with Juno in general. Change-Id: I028776c481a1c96bba3496adfcca149f9ada42d3 Blueprint: object-storage-cleanup
		
			
				
	
	
		
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			47 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # encoding: UTF-8
 | |
| require_relative 'spec_helper'
 | |
| 
 | |
| describe 'openstack-object-storage::storage-common' do
 | |
|   describe 'ubuntu' do
 | |
|     let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) }
 | |
|     let(:node) { runner.node }
 | |
|     let(:chef_run) do
 | |
|       runner.converge(described_recipe)
 | |
|     end
 | |
| 
 | |
|     include_context 'swift-stubs'
 | |
| 
 | |
|     describe '/var/cache/swift' do
 | |
|       let(:dir) { chef_run.directory('/var/cache/swift') }
 | |
| 
 | |
|       it 'creates /var/cache/swift' do
 | |
|         expect(chef_run).to create_directory(dir.name).with(
 | |
|           user: 'swift',
 | |
|           group: 'swift',
 | |
|           mode: 0700
 | |
|         )
 | |
|       end
 | |
|     end
 | |
| 
 | |
|     describe '/etc/swift/drive-audit.conf' do
 | |
|       let(:file) { chef_run.template('/etc/swift/drive-audit.conf') }
 | |
| 
 | |
|       it_behaves_like 'custom template banner displayer' do
 | |
|         let(:file_name) { file.name }
 | |
|       end
 | |
| 
 | |
|       it 'creates drive-audit.conf' do
 | |
|         expect(chef_run).to create_template(file.name).with(
 | |
|           user: 'swift',
 | |
|           group: 'swift',
 | |
|           mode: 0600
 | |
|         )
 | |
|       end
 | |
| 
 | |
|       it 'template contents' do
 | |
|         skip 'TODO: implement'
 | |
|       end
 | |
|     end
 | |
|   end
 | |
| end
 |