Skip to content

Commit

Permalink
Merge pull request #622 from puppetlabs/CAT-1429-removal-of-red-hat-s…
Browse files Browse the repository at this point in the history
…cientific-oracle-linux-6-for-vcs-repo-module

(CAT-1429) Removal of redhat/scientific/oraclelinux for vcs repo module
  • Loading branch information
Ramesh7 authored Sep 20, 2023
2 parents e5d9e4c + 8cd45f3 commit 2b05c3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 143 deletions.
142 changes: 1 addition & 141 deletions spec/acceptance/svn_paths_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 1 addition & 2 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2b05c3a

Please sign in to comment.