18761: use repository keyring instead of key_id
[arvados-formula.git] / test / integration / shell / controls / repo_spec.rb
index a9dc3cbf86fed8424e339ca7755210cbc5f327cb..0f097fe0a5e598554539ac5338f14ec48cbfe5c0 100644 (file)
@@ -23,7 +23,23 @@ when 'debian', 'ubuntu'
     codename = 'bullseye'
   end
   repo_file = '/etc/apt/sources.list.d/arvados.list'
-  repo_url = "deb http://apt.arvados.org/#{codename} #{codename}-dev main"
+  repo_keyring = '/usr/share/keyrings/arvados-archive-keyring.gpg'
+  repo_url = "deb [signed-by=/usr/share/keyrings/arvados-archive-keyring.gpg arch=amd64] http://apt.arvados.org/#{codename} #{codename}-dev main"
+end
+
+control 'arvados repository keyring' do
+  title 'should be installed'
+
+  only_if('Requirement for Debian family') do
+    platform.family == 'debian'
+  end
+
+  describe file(repo_keyring) do
+    it { should exist }
+    it { should be_owned_by 'root' }
+    it { should be_grouped_into 'root' }
+    its('mode') { should cmp '0644' }
+  end
 end
 
 control 'arvados repository' do