Files
cookbook-openstack-object-s…/spec/rsync_spec.rb
Mark Vanderwiel d0ce1d6c57 Add swift.conf template
* 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
2015-01-15 18:00:35 +00:00

43 lines
999 B
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-object-storage::rsync' 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'
it 'upgrades git package for ring management' do
expect(chef_run).to upgrade_package('rsync')
end
it 'starts rsync service on boot' do
%w{rsync}.each do |svc|
expect(chef_run).to enable_service(svc)
end
end
describe '/etc/rsyncd.conf' do
let(:file) { chef_run.template('/etc/rsyncd.conf') }
it_behaves_like 'custom template banner displayer' do
let(:file_name) { file.name }
end
it 'creates /etc/rsyncd.conf' do
expect(chef_run).to create_template(file.name).with(
mode: 0644
)
end
it 'template contents' do
skip 'TODO: implement'
end
end
end
end