18663: fix tests for keepbalance
[arvados-formula.git] / test / integration / api / controls / packages_spec.rb
1 # frozen_string_literal: true
2
3 # Copyright (C) The Arvados Authors. All rights reserved.
4 #
5 # SPDX-License-Identifier: Apache-2.0
6
7 control 'arvados api package' do
8   title 'should be installed'
9
10   describe package('arvados-api-server') do
11     it { should be_installed }
12   end
13 end
14
15 control 'RVM dependencies' do
16   title 'should be installed'
17
18   only_if("Forced requirement for RedHat's family") do
19     os.redhat?
20   end
21
22   %w[
23     centos-release-scl
24     curl
25     gcc
26     git
27     libcurl
28     libcurl-devel
29     libxml2
30     libxml2-devel
31     make
32     pam-devel
33     postgresql12-libs
34     python3-devel
35     zlib-devel
36   ].each do |p|
37     describe package(p) do
38       it { should be_installed }
39     end
40   end
41 end
42
43 control 'RVM ruby manager' do
44   title 'should be installed'
45
46   only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do
47     (os.redhat? and platform[:release].to_f.truncate == 7) or
48       (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or
49       (os.name == 'debian' and platform[:release].to_f.truncate == 10)
50   end
51
52   describe command('/usr/local/rvm/bin/rvm list') do
53     its(:exit_status) { should eq 0 }
54     its('stdout') { should match(/ruby-2.7.2/) }
55   end
56 end
57
58 control 'arvados cli gem' do
59   title 'should be installed'
60
61   only_if('Skipped in Centos-7, Ubuntu-18.04 and Debian-10') do
62     !((os.redhat? and platform[:release].to_f.truncate == 7) or
63     (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or
64     (os.name == 'debian' and platform[:release].to_f.truncate == 10))
65   end
66
67   describe gem('arvados-cli') do
68     it { should be_installed }
69   end
70 end
71
72 control 'RVM arvados cli gem' do
73   title 'should be installed'
74
75   only_if('Forced requirement for Centos-7, Ubuntu-18.04 and Debian-10') do
76     (os.redhat? and platform[:release].to_f.truncate == 7) or
77       (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) or
78       (os.name == 'debian' and platform[:release].to_f.truncate == 10)
79   end
80
81   describe gem('arvados-cli', '/usr/local/rvm/bin/rvm all do gem') do
82     it { should be_installed }
83   end
84 end