
Add acceptance tests for puppet-cgit module so that once the module is applied we check if files were created, packages were installed and services were started. Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com> Co-Authored-By: Danilo Ramalho <dramalho@thoughtworks.com> Change-Id: I8d12999b6d91f1ab67fa16d6bbd8bc1d2efa3a05
32 lines
773 B
Ruby
32 lines
773 B
Ruby
require 'spec_helper_acceptance'
|
|
|
|
describe 'puppet-cgit module' do
|
|
def pp_path
|
|
base_path = File.dirname(__FILE__)
|
|
File.join(base_path, 'fixtures')
|
|
end
|
|
|
|
def preconditions_puppet_module
|
|
module_path = File.join(pp_path, 'preconditions.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
def default_puppet_module
|
|
module_path = File.join(pp_path, 'default.pp')
|
|
File.read(module_path)
|
|
end
|
|
|
|
before(:all) do
|
|
apply_manifest(preconditions_puppet_module, catch_failures: true)
|
|
end
|
|
|
|
it 'should work with no errors' do
|
|
apply_manifest(default_puppet_module, catch_failures: true)
|
|
end
|
|
|
|
it 'should be idempotent' do
|
|
apply_manifest(default_puppet_module, catch_failures: true)
|
|
apply_manifest(default_puppet_module, catch_changes: true)
|
|
end
|
|
end
|