From f71042048fef29103a138b6b27e3d7515b327077 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20B=C3=A9rtoli?= Date: Fri, 19 Nov 2021 19:06:35 -0300 Subject: [PATCH] Fix ubuntu-18.04 gems and postgres versions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Arvados-DCO-1.1-Signed-off-by: Javier Bértoli --- .../shell/controls/packages_spec.rb | 26 +++++++++++++++++++ test/salt/pillar/examples/postgresql.sls | 9 ++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/test/integration/shell/controls/packages_spec.rb b/test/integration/shell/controls/packages_spec.rb index 7ce0f2d..ac58157 100644 --- a/test/integration/shell/controls/packages_spec.rb +++ b/test/integration/shell/controls/packages_spec.rb @@ -37,3 +37,29 @@ control 'arvados shell gems' do end end end + +control 'arvados shell gems' do + title 'should be installed' + + only_if('Skipped in Centos-7 and Ubuntu-18.04') do + !((os.redhat? and platform[:release].to_f.truncate == 7) or + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18)) + end + + describe gem('arvados-cli') do + it { should be_installed } + end +end + +control 'RVM arvados shell gems' do + title 'should be installed' + + only_if('Forced requirement for Centos-7 and Ubuntu-18.04') do + (os.redhat? and platform[:release].to_f.truncate == 7) or + (os.name == 'ubuntu' and platform[:release].to_f.truncate == 18) + end + + describe gem('arvados-cli', '/usr/local/rvm/bin/rvm all do gem') do + it { should be_installed } + end +end diff --git a/test/salt/pillar/examples/postgresql.sls b/test/salt/pillar/examples/postgresql.sls index 0bf3357..a60b41f 100644 --- a/test/salt/pillar/examples/postgresql.sls +++ b/test/salt/pillar/examples/postgresql.sls @@ -5,21 +5,24 @@ ### POSTGRESQL postgres: - # Centos-7's postgres package is too old, so we need to force using upstream's + # Centos-7 and Ubuntu-18.04's postgres packages are too old, so we need to force using upstream's # This is not required in Debian's family as they already ship with PG +11 - {%- if salt['grains.get']('os_family') == 'RedHat' %} + {%- if salt['grains.get']('osfinger') in ['Ubuntu-18.04', 'CentOS Linux-7'] %} use_upstream_repo: true version: '12' + {%- if salt['grains.get']('osfinger') == 'CentOS Linux-7' %} pkgs_deps: - libicu - libxslt - systemd-sysv - pkgs_extra: - postgresql12-contrib + {%- endif %} + {%- else %} + use_upstream_repo: false pkgs_extra: - postgresql-contrib {%- endif %} -- 2.30.2