 60ed2ee79c
			
		
	
	60ed2ee79c
	
	
	
		
			
			Maintains full backward compatibility. Use swift_proxy_config ini provider to mange proxy-server.conf. Remove all erb templates. Move all template logic into proxy middleware classes. To purge proxy.conf of settings that are not specified set the new paramater "purge_config" to "true". Change-Id: I0a143cf812043ea0f9a008a6e5c60ec87f9a4e9a
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require 'spec_helper'
 | |
| 
 | |
| describe 'swift::proxy::slo' do
 | |
| 
 | |
|   let :facts do
 | |
|     {}
 | |
|   end
 | |
| 
 | |
|   describe "when using default parameters" do
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/use').with_value('egg:swift#slo') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value('1000') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value('2097152') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/min_segment_size').with_value('1048576') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value('10') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_segments_per_sec').with_value('0') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value('86400') }
 | |
|   end
 | |
| 
 | |
|   describe "when overriding default parameters" do
 | |
|     let :params do
 | |
|       {
 | |
|         :max_manifest_segments     => '2000',
 | |
|         :max_manifest_size         => '500000',
 | |
|         :rate_limit_after_segment  => '30',
 | |
|         :max_get_time              => '6400',
 | |
|       }
 | |
|     end
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_segments').with_value('2000') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_manifest_size').with_value('500000') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/rate_limit_after_segment').with_value('30') }
 | |
|     it { is_expected.to contain_swift_proxy_config('filter:slo/max_get_time').with_value('6400') }
 | |
|   end
 | |
| 
 | |
| end
 |