Skip to content

Commit 43b4329

Browse files
committed
test(repository): redhat's family alternatives for repo url
1 parent 7bba14a commit 43b4329

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/integration/repo/controls/repository.rb

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# frozen_string_literal: true
22

33
case platform.family
4-
when 'redhat', 'fedora'
5-
repo_file = '/etc/yum.repos.d/pgdg13.repo'
4+
when 'redhat', 'fedora', 'suse'
5+
os_name_repo_file = {
6+
'opensuse' => '/etc/zypp/repos.d/pgdg-sles-13.repo'
7+
}
8+
os_name_repo_file.default = '/etc/yum.repos.d/pgdg13.repo'
9+
610
os_name_repo_url = {
711
'amazon' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-7-$basearch',
812
'fedora' => 'https://download.postgresql.org/pub/repos/yum/13/fedora/fedora-$releasever-$basearch',
9-
'default' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
13+
'opensuse' => 'https://download.postgresql.org/pub/repos/zypp/13/suse/sles-$releasever-$basearch'
1014
}
15+
os_name_repo_url.default = 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
16+
1117
repo_url = os_name_repo_url[platform.name]
18+
repo_file = os_name_repo_file[platform.name]
1219

1320
when 'debian'
1421
# Inspec does not provide a `codename` matcher, so we add ours

0 commit comments

Comments
 (0)