From 8cd45f3a3e9b8c9b6d6a34a60033ac92d85ad718 Mon Sep 17 00:00:00 2001 From: praj1001 <134480625+praj1001@users.noreply.github.com> Date: Mon, 18 Sep 2023 19:04:27 +0530 Subject: [PATCH] (CAT-1429) Removal of redhat/scientific/oraclelinux for vcs repo module --- spec/acceptance/svn_paths_spec.rb | 142 +-------------------------- spec/spec_helper_acceptance_local.rb | 3 +- 2 files changed, 2 insertions(+), 143 deletions(-) diff --git a/spec/acceptance/svn_paths_spec.rb b/spec/acceptance/svn_paths_spec.rb index 3421472a..bee55286 100644 --- a/spec/acceptance/svn_paths_spec.rb +++ b/spec/acceptance/svn_paths_spec.rb @@ -4,9 +4,8 @@ tmpdir = '/tmp/vcsrepo' -describe 'subversion :includes tests on SVN version >= 1.7', unless: ( # rubocop:disable RSpec/MultipleDescribes : The +describe 'subversion :includes tests on SVN version >= 1.7', unless: ( # : The # test's on this page must be kept seperate as they are for different operating systems. - (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) || (os[:family] == 'sles') ) do before(:all) do @@ -149,142 +148,3 @@ end end end - -describe 'subversion :includes tests on SVN version == 1.6', if: ( - (os[:family] == 'redhat' && os[:release].start_with?('5', '6')) - ) do - after(:all) do - run_shell("rm -rf #{tmpdir}/svnrepo") - end - - context 'with include paths' do - pp = <<-MANIFEST - vcsrepo { "#{tmpdir}/svnrepo": - ensure => present, - provider => svn, - includes => ['difftools/README', 'obsolete-notes',], - source => "http://svn.apache.org/repos/asf/subversion/developer-resources", - revision => 1000000, - } - MANIFEST - it 'can checkout specific paths from svn' do - # Run it twice and test for idempotency - idempotent_apply(pp) - end - - describe file("#{tmpdir}/svnrepo/difftools") do - it { is_expected.to be_directory } - end - - describe file("#{tmpdir}/svnrepo/difftools/README") do - its(:md5sum) { is_expected.to eq '540241e9d5d4740d0ef3d27c3074cf93' } - end - - describe file("#{tmpdir}/svnrepo/difftools/pics") do - it { is_expected.not_to exist } - end - - describe file("#{tmpdir}/svnrepo/obsolete-notes") do - it { is_expected.to be_directory } - end - - describe file("#{tmpdir}/svnrepo/obsolete-notes/draft-korn-vcdiff-01.txt") do - its(:md5sum) { is_expected.to eq '37019f808e1af64864853a67526cfe19' } - end - - describe file("#{tmpdir}/svnrepo/obsolete-notes/vcdiff-karlnotes") do - its(:md5sum) { is_expected.to eq '26e23ff6a156de14aebd1099e23ac2d8' } - end - - describe file("#{tmpdir}/svnrepo/guis") do - it { is_expected.not_to exist } - end - end - - context 'with add include paths' do - pp = <<-MANIFEST - vcsrepo { "#{tmpdir}/svnrepo": - ensure => present, - provider => svn, - includes => ['difftools/README', 'obsolete-notes', 'guis/pics', 'difftools/pics/README'], - source => "http://svn.apache.org/repos/asf/subversion/developer-resources", - revision => 1000000, - } - MANIFEST - it 'can add paths to includes' do - # Run it twice and test for idempotency - idempotent_apply(pp) - end - - describe file("#{tmpdir}/svnrepo/guis/pics/README") do - its(:md5sum) { is_expected.to eq '62bdc9180684042fe764d89c9beda40f' } - end - - describe file("#{tmpdir}/svnrepo/difftools/pics/README") do - its(:md5sum) { is_expected.to eq 'bad02dfc3cb96bf5cadd59bf4fe3e00e' } - end - end - - context 'with remove include paths' do - pp = <<-MANIFEST - vcsrepo { "#{tmpdir}/svnrepo": - ensure => present, - provider => svn, - includes => ['difftools/pics/README', 'obsolete-notes',], - source => "http://svn.apache.org/repos/asf/subversion/developer-resources", - revision => 1000000, - } - MANIFEST - it 'can remove directory paths (and empty parent directories) from includes, but not files with siblings' do - apply_manifest(pp, catch_failures: true) - end - - describe file("#{tmpdir}/svnrepo/guis/pics/README") do - it { is_expected.not_to exist } - end - - describe file("#{tmpdir}/svnrepo/guis/pics") do - it { is_expected.not_to exist } - end - - describe file("#{tmpdir}/svnrepo/guis") do - it { is_expected.not_to exist } - end - - describe file("#{tmpdir}/svnrepo/difftools/pics/README") do - its(:md5sum) { is_expected.to eq 'bad02dfc3cb96bf5cadd59bf4fe3e00e' } - end - - describe file("#{tmpdir}/svnrepo/difftools/README") do - its(:md5sum) { is_expected.to eq '540241e9d5d4740d0ef3d27c3074cf93' } - end - end - - context 'with changing revisions' do - pp = <<-MANIFEST - vcsrepo { "#{tmpdir}/svnrepo": - ensure => present, - provider => svn, - includes => ['difftools/README', 'obsolete-notes',], - source => "http://svn.apache.org/repos/asf/subversion/developer-resources", - revision => 1700000, - } - MANIFEST - it 'can change revisions' do - # Run it twice and test for idempotency - idempotent_apply(pp) - end - - it 'svn info of svnrepo' do - run_shell("svn info #{tmpdir}/svnrepo") do |r| - expect(r.stdout).to match(%r{.*Revision: 1700000.*}) - end - end - - it 'svn info of svnrepo/difftools/README' do - run_shell("svn info #{tmpdir}/svnrepo/difftools/README") do |r| - expect(r.stdout).to match(%r{.*Revision: 1700000.*}) - end - end - end -end diff --git a/spec/spec_helper_acceptance_local.rb b/spec/spec_helper_acceptance_local.rb index cf1d88f9..e25b9f06 100644 --- a/spec/spec_helper_acceptance_local.rb +++ b/spec/spec_helper_acceptance_local.rb @@ -59,6 +59,5 @@ def create_repo # git with 3.18 changes the maximum enabled TLS protocol version, older OSes will fail these tests def only_supports_weak_encryption - ((os[:family] == 'redhat' && os[:release].start_with?('5', '6')) || - (os[:family] == 'sles' && os[:release].start_with?('11'))) + (os[:family] == 'sles' && os[:release].start_with?('11')) end