Skip to content

Commit

Permalink
test(repository): redhat's family alternatives for repo url
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Feb 7, 2022
1 parent 7bba14a commit 43b4329
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/integration/repo/controls/repository.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# frozen_string_literal: true

case platform.family
when 'redhat', 'fedora'
repo_file = '/etc/yum.repos.d/pgdg13.repo'
when 'redhat', 'fedora', 'suse'
os_name_repo_file = {
'opensuse' => '/etc/zypp/repos.d/pgdg-sles-13.repo'
}
os_name_repo_file.default = '/etc/yum.repos.d/pgdg13.repo'

os_name_repo_url = {
'amazon' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-7-$basearch',
'fedora' => 'https://download.postgresql.org/pub/repos/yum/13/fedora/fedora-$releasever-$basearch',
'default' => 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
'opensuse' => 'https://download.postgresql.org/pub/repos/zypp/13/suse/sles-$releasever-$basearch'
}
os_name_repo_url.default = 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'

repo_url = os_name_repo_url[platform.name]
repo_file = os_name_repo_file[platform.name]

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

0 comments on commit 43b4329

Please sign in to comment.