fix(opensuse): fix repo key parameter

Also, fix tests for the different RedHat's family members
This commit is contained in:
Javier Bértoli 2022-02-04 20:13:51 -03:00
parent b6a28fee0d
commit 7bba14a61c
2 changed files with 9 additions and 3 deletions

View file

@ -145,7 +145,7 @@ Suse:
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch
# works for postgres 11 onwards
baseurl: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch'
key_url: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch/repodata/repomd.xml.key'
gpgkey: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-$releasever-$basearch/repodata/repomd.xml.key'
gpgcheck: 1
gpgautoimport: True

View file

@ -1,9 +1,15 @@
# frozen_string_literal: true
case platform.family
when 'redhat'
when 'redhat', 'fedora'
repo_file = '/etc/yum.repos.d/pgdg13.repo'
repo_url = 'https://download.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasever-$basearch'
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'
}
repo_url = os_name_repo_url[platform.name]
when 'debian'
# Inspec does not provide a `codename` matcher, so we add ours
finger_codename = {