From 965588b10808dea7dcf13fa651c95f61f2e4f83b Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 1 May 2020 03:16:09 +0100 Subject: [PATCH] test(pkgs_spec): update for CVE releases `3000.2` & `2019.2.4` * https://docs.saltstack.com/en/latest/topics/releases/3000.2.html * https://docs.saltstack.com/en/latest/topics/releases/2019.2.4.html --- .../v201902-py2/controls/pkgs_spec.rb | 18 ++++++++++++--- .../v201902-py3/controls/pkgs_spec.rb | 23 ++++++++++++------- .../v3000-py3/controls/pkgs_spec.rb | 23 ++++++++++++------- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/test/integration/v201902-py2/controls/pkgs_spec.rb b/test/integration/v201902-py2/controls/pkgs_spec.rb index 4c83c47..99ce1d6 100644 --- a/test/integration/v201902-py2/controls/pkgs_spec.rb +++ b/test/integration/v201902-py2/controls/pkgs_spec.rb @@ -1,11 +1,23 @@ # frozen_string_literal: true +# Prepare platform "finger" +platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}" + version = case platform[:family] - when 'redhat' - '2019.2.3-1.el7' when 'debian' - '2019.2.3+ds-1' + '2019.2.4+ds-1' + when 'redhat' + case platform_finger + when 'centos-7' + '2019.2.4-1.el7' + when 'centos-6' + '2019.2.4-1.el6' + when 'amazon-2' + '2019.2.4-1.amzn2' + when 'amazon-2018' + '2019.2.4-1.amzn1' + end end control 'salt packages' do diff --git a/test/integration/v201902-py3/controls/pkgs_spec.rb b/test/integration/v201902-py3/controls/pkgs_spec.rb index d3cc963..79291a6 100644 --- a/test/integration/v201902-py3/controls/pkgs_spec.rb +++ b/test/integration/v201902-py3/controls/pkgs_spec.rb @@ -1,20 +1,27 @@ # frozen_string_literal: true +# Prepare platform "finger" +platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}" + version = case platform[:family] + when 'debian' + '2019.2.4+ds-1' when 'redhat' - case platform[:name] - when 'amazon' - '2019.2.3-1.amzn2' - when 'centos' - '2019.2.3-1.el8' + case platform_finger + when 'centos-8' + '2019.2.4-1.el8' + when 'centos-7' + '2019.2.4-1.el7' + when 'amazon-2' + '2019.2.4-1.amzn2' end when 'fedora' - '2019.2.1rc0-3.fc31' + # Issue in the upstream repo, should be `3000.2` + '3000.1-1.fc31' when 'suse' + # Issue in the upstream repo, should be `2019.2.4` '2019.2.0-lp151.28.1' - when 'debian' - '2019.2.3+ds-1' end control 'salt packages' do diff --git a/test/integration/v3000-py3/controls/pkgs_spec.rb b/test/integration/v3000-py3/controls/pkgs_spec.rb index 65d2dc0..9b03b7f 100644 --- a/test/integration/v3000-py3/controls/pkgs_spec.rb +++ b/test/integration/v3000-py3/controls/pkgs_spec.rb @@ -1,20 +1,27 @@ # frozen_string_literal: true +# Prepare platform "finger" +platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}" + version = case platform[:family] + when 'debian' + '3000.2+ds-1' when 'redhat' - case platform[:name] - when 'amazon' - '3000.1-1.amzn2' - when 'centos' - '3000.1-1.el8' + case platform_finger + when 'centos-8' + '3000.2-1.el8' + when 'centos-7' + '3000.2-1.el7' + when 'amazon-2' + '3000.2-1.amzn2' end when 'fedora' + # Issue in the upstream repo, should be `3000.2` '3000.1-1.fc31' when 'suse' - '3000-lp151.28.1' - when 'debian' - '3000.1+ds-1' + # Issue in the upstream repo, should be `3000.2` + '2019.2.0-lp151.28.1' end control 'salt packages' do