Merge branch '18378-add-debian-11-platform'
[arvados-formula.git] / test / integration / repo / controls / repo_spec.rb
index 33caf8f7e9bee9992145579de151aa8eae255e37..601119f2ba15088487dd6ef4137ca1931223e6f2 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
 # frozen_string_literal: true
 
 case os[:name]
@@ -5,8 +9,21 @@ when 'centos'
   repo_file = '/etc/yum.repos.d/arvados.repo'
   repo_url = 'baseurl=http://rpm.arvados.org/CentOS/$releasever/os/$basearch/'
 when 'debian', 'ubuntu'
+  # Inspec does not provide a `codename` matcher, so we add ours
+  case platform[:release].to_f.truncate
+  # ubuntu
+  when 18
+    codename = 'bionic'
+  when 20
+    codename = 'focal'
+  # debian
+  when 10
+    codename = 'buster'
+  when 11
+    codename = 'bullseye'
+  end
   repo_file = '/etc/apt/sources.list.d/arvados.list'
-  repo_url = 'deb http://apt.arvados.org buster main'
+  repo_url = "deb http://apt.arvados.org/#{codename} #{codename} main"
 end
 
 control 'arvados repository' do