Skip to content

Commit 6c82a76

Browse files
committed
(spec/rucio_spec.rb) add class test
1 parent 36f031b commit 6c82a76

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

spec/classes/core/rucio_spec.rb

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe 'profile::core::rucio' do
6+
on_supported_os.each do |os, os_facts|
7+
next unless os =~ %r{almalinux-9-x86_64}
8+
9+
context "on #{os}" do
10+
let(:facts) { os_facts }
11+
12+
it { is_expected.to compile.with_all_deps }
13+
14+
it do
15+
is_expected.to contain_yumrepo('xrootd-stable').with(
16+
descr: 'XRootD Stable Repository',
17+
baseurl: 'https://xrootd.web.cern.ch/repo/stable/el$releasever/$basearch',
18+
skip_if_unavailable: 'true',
19+
gpgcheck: '1',
20+
gpgkey: 'https://xrootd.web.cern.ch/repo/RPM-GPG-KEY.txt',
21+
enabled: '1',
22+
target: '/etc/yum.repo.d/xrootd.repo'
23+
)
24+
end
25+
26+
['/lib/systemd/system/[email protected]', '/lib/systemd/system/[email protected]'].each do |path|
27+
it do
28+
is_expected.to contain_file(path).with(
29+
ensure: 'file',
30+
mode: '0644',
31+
owner: 'saluser',
32+
group: 'saluser'
33+
)
34+
end
35+
end
36+
37+
['/etc/xrootd', '/var/log/xrootd', '/var/run/xrootd', '/var/spool/xrootd'].each do |path|
38+
it do
39+
is_expected.to contain_file(path).with(
40+
ensure: 'directory',
41+
mode: '0644',
42+
owner: 'saluser',
43+
group: 'saluser'
44+
)
45+
end
46+
end
47+
end
48+
end
49+
end

0 commit comments

Comments
 (0)