-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'bacula::director::console' do | ||
on_supported_os.each do |os, facts| | ||
context "on #{os}" do | ||
let(:facts) { facts } | ||
|
||
let(:pre_condition) { 'include bacula' } | ||
|
||
context 'with default parameters' do | ||
let(:title) { 'Monitoring' } | ||
|
||
let(:params) do | ||
{ | ||
password: 'monitoring_password', | ||
} | ||
end | ||
|
||
it { is_expected.to contain_concat__fragment('bacula-director-console-Monitoring').with(content: <<~FRAGMENT) } | ||
Console { | ||
Name = Monitoring | ||
Password = "monitoring_password" | ||
CatalogACL = *all* | ||
CommandACL = list | ||
} | ||
FRAGMENT | ||
end | ||
|
||
context 'with all parameters set' do | ||
let(:title) { 'restricted-user' } | ||
|
||
let(:params) do | ||
{ | ||
password: 'A different UntrustedUser', | ||
jobacl: 'Restricted Client Save', | ||
clientacl: 'restricted-client', | ||
storageacl: 'second-storage', | ||
scheduleacl: 'weekly-schedule', | ||
poolacl: 'backup-pool', | ||
filesetacl: "Restricted Client's FileSet", | ||
catalogacl: 'RestrictedCatalog', | ||
commandacl: %w[run restore], | ||
whereacl: '/', | ||
} | ||
end | ||
|
||
it { is_expected.to contain_concat__fragment('bacula-director-console-restricted-user').with(content: <<~FRAGMENT) } | ||
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 8 (Ruby 3.2)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
Check failure on line 49 in spec/defines/director_console_spec.rb GitHub Actions / Puppet / 7 (Ruby 2.7)
|
||
Console { | ||
Name = restricted-user | ||
Password = "A different UntrustedUser" | ||
JobACL = Restricted Client Save | ||
ClientACL = restricted-client | ||
StorageACL = second-storage | ||
ScheduleACL = weekly-schedule | ||
PoolACL = backup-pool | ||
FileSetACL = Restricted Client's FileSet | ||
CatalogACL = RestrictedCatalog | ||
CommandACL = run, restore | ||
WhereACL = / | ||
} | ||
FRAGMENT | ||
end | ||
end | ||
end | ||
end |