Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 23, 2024
1 parent ce7318a commit c18ffe8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions spec/defines/project_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# frozen_string_literal: true

require 'spec_helper'

describe 'bolt::project' do
let(:title) { 'peadm' }

on_supported_os.each do |os, os_facts|
context "on #{os}" do
let :facts do
os_facts.merge({ sudoversion: '1.9.5p2' })
end

context 'with defaults' do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('bolt') }
it { is_expected.to contain_file('/opt/peadm/bolt-project.yaml').with_ensure('file') }
it { is_expected.to contain_file('/opt/peadm/inventory.yaml').with_ensure('file') }
it { is_expected.to contain_file('/opt/peadm').with_ensure('directory') }
it { is_expected.to contain_user(title) }
it { is_expected.to contain_group(title) }
it { is_expected.to contain_package('puppet-bolt') }
it { is_expected.to contain_package('puppet-tools-release') }
it { is_expected.not_to contain_yumrepo('puppet-tools') }
it { is_expected.to contain_sudo__conf(title) }
it { is_expected.to contain_systemd__unit_file("#{title}@.service") }
end

context 'with manage_user=false' do
let :params do
{ manage_user: false }
end

it { is_expected.not_to contain_user(title) }
it { is_expected.not_to contain_group(title) }
end
end
end
end

0 comments on commit c18ffe8

Please sign in to comment.