cookbook-openstack-ops-data.../spec/postgresql-server_spec.rb

28 lines
785 B
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-ops-database::postgresql-server' do
describe 'ubuntu' do
include_context 'database-stubs'
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
let(:node) { runner.node }
let(:chef_run) do
# The postgresql cookbook will raise an 'uninitialized constant
# Chef::Application' error without this attribute when running
# the tests
node.set['postgresql']['password']['postgres'] = 'postgres_password'
runner.converge(described_recipe)
end
it 'includes postgresql recipes' do
expect(chef_run).to include_recipe(
'openstack-ops-database::postgresql-client'
)
expect(chef_run).to include_recipe('postgresql::server')
end
end
end