Merge branch '18631-shell-login-sync'
[arvados-formula.git] / test / integration / shell / controls / packages_spec.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4 # frozen_string_literal: true
5
6 packages_list = %w[
7   arvados-client
8   arvados-src
9   python3-arvados-fuse
10   python3-arvados-python-client
11   python3-arvados-cwl-runner
12   python3-crunchstat-summary
13   shellinabox
14 ]
15
16 gems_list = %w[
17   arvados-cli
18   arvados-login-sync
19 ]
20
21 control 'arvados shell packages' do
22   title 'should be installed'
23
24   packages_list.each do |p|
25     describe package(p) do
26       it { should be_installed }
27     end
28   end
29 end
30
31 control 'arvados shell gems' do
32   title 'should be installed'
33
34   gems_list.each do |p|
35     describe gem(p) do
36       it { should be_installed }
37     end
38   end
39 end
40
41 control 'arvados shell gems' do
42   title 'should be installed'
43
44   only_if('Skipped in Centos-7, Ubuntu-18.04 and Debian-10') do
45     !((os.redhat? and platform[:release].to_f.truncate == 7) or
46     (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or
47     (os.name == 'debian' and platform[:release].to_f.truncate == 10))
48   end
49
50   describe gem('arvados-cli') do
51     it { should be_installed }
52   end
53 end
54
55 control 'RVM arvados shell gems' do
56   title 'should be installed'
57
58   only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do
59     (os.redhat? and platform[:release].to_f.truncate == 7) or
60       (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or
61       (os.name == 'debian' and platform[:release].to_f.truncate == 10)
62   end
63
64   describe gem('arvados-cli', '/usr/local/rvm/bin/rvm all do gem') do
65     it { should be_installed }
66   end
67 end