1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 # frozen_string_literal: true
9 repo_file = '/etc/yum.repos.d/arvados.repo'
10 repo_url = 'baseurl=http://rpm.arvados.org/CentOS/$releasever/dev/$basearch/'
11 when 'debian', 'ubuntu'
12 # Inspec does not provide a `codename` matcher, so we add ours
13 case platform[:release].to_f.truncate
25 repo_file = '/etc/apt/sources.list.d/arvados.list'
26 repo_keyring = '/usr/share/keyrings/arvados-archive-keyring.gpg'
27 repo_url = "deb [signed-by=/usr/share/keyrings/arvados-archive-keyring.gpg arch=amd64] http://apt.arvados.org/#{codename} #{codename}-dev main"
30 control 'arvados repository keyring' do
31 title 'should be installed'
33 only_if('Requirement for Debian family') do
34 platform.family == 'debian'
37 describe file(repo_keyring) do
39 it { should be_owned_by 'root' }
40 it { should be_grouped_into 'root' }
41 its('mode') { should cmp '0644' }
45 control 'arvados repository' do
47 title 'should be configured'
48 desc 'Ensures arvados source is correctly configured'
49 describe file(repo_file) do
50 its('content') { should include repo_url }