Skip to content

Commit 0e51694

Browse files
committed
test(repository): use system.platform[:codename] [skip ci]
Tested: * https://gitlab.com/myii/nginx-formula/-/pipelines/470231421
1 parent 5f1a289 commit 0e51694

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

test/integration/passenger/controls/repository.rb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@
55
repo_file = '/etc/yum.repos.d/passenger.repo'
66
repo_url = 'https://oss-binaries.phusionpassenger.com/yum/passenger/el/$releasever/$basearch'
77
when 'debian'
8-
# Inspec does not provide a `codename` matcher, so we add ours
9-
finger_codename = {
10-
'ubuntu-18.04' => 'bionic',
11-
'ubuntu-20.04' => 'focal',
12-
'debian-9' => 'stretch',
13-
'debian-10' => 'buster',
14-
'debian-11' => 'bullseye'
15-
}
16-
codename = finger_codename[system.platform[:finger]]
17-
8+
codename = system.platform[:codename]
189
repo_keyring = '/usr/share/keyrings/phusionpassenger-archive-keyring.gpg'
1910
repo_file = "/etc/apt/sources.list.d/phusionpassenger-official-#{codename}.list"
20-
# rubocop:disable Metrics/LineLength
11+
# rubocop:disable Layout/LineLength
2112
repo_url = "deb [signed-by=#{repo_keyring}] https://oss-binaries.phusionpassenger.com/apt/passenger #{codename} main"
22-
# rubocop:enable Metrics/LineLength
13+
# rubocop:enable Layout/LineLength
2314
end
2415

2516
control 'Phusion-passenger repository keyring' do

0 commit comments

Comments
 (0)