beaker-puppet 3.0.1 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3fe57eaf8134ebaf8e7d3059b5cbf927a023b9264fba6bed84ab25c8fc475b8
4
- data.tar.gz: b336af52d9d10b87473a51b76471f17f23d9913a59071c76395e413e5096331f
3
+ metadata.gz: 37f61fccae5c08bae5c7653b34c25b505cbd4962093f1508852dd2bf578d003b
4
+ data.tar.gz: 419309478e2bab667ccea4ee45f1c023cad6723f80a6b3874ce323cfc4bac9cc
5
5
  SHA512:
6
- metadata.gz: 93fabb76ba35f1d2af79beb763da85bc9e65bd1fd412214f2f0d898251fd1018630a00ac319b15098b57258ef925ed835a50d83fee98f1d6d25c3e50a83320c8
7
- data.tar.gz: caddb56e11d1c2f44996d70bc9b732321ce3aa48d8e492da82b67fca3f2d0b871e4e4015348429db1147b23f912739447a8d7eabf009bbf63c44261fbe470a56
6
+ metadata.gz: 60d06296bad76fa5a08317f4d439044ec16d52fa661aad6e5d3a8e3b6bb412fbe3a463d28d32d410e233a33d543dbae055acd48e7bbc24ea369f0e75d39248d5
7
+ data.tar.gz: d34b27685bef1bce10eb0ddb0e5102af3a9b8fb54b0611553e402891460a318f9e452bc8a6876487c79264d64e7b9c5e322aaa2421a825b40fe110c0edd12d47
@@ -29,4 +29,4 @@ jobs:
29
29
  echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30
30
  chmod 0600 ~/.gem/credentials
31
31
  - name: Publish gem to GitHub packages
32
- run: gem push --key github --host https://rubygems.pkg.github.com/voxpupuli *.gem
32
+ run: gem push --key github --host https://rubygems.pkg.github.com/puppetlabs *.gem
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [4.0.0](https://github.com/puppetlabs/beaker-puppet/tree/4.0.0) (2024-05-28)
6
+
7
+ [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/3.0.1...4.0.0)
8
+
9
+ **Breaking changes:**
10
+
11
+ - Add support for Beaker 6 [\#255](https://github.com/puppetlabs/beaker-puppet/pull/255) ([mhashizume](https://github.com/mhashizume))
12
+ - Remove unsupported network platforms [\#254](https://github.com/puppetlabs/beaker-puppet/pull/254) ([mhashizume](https://github.com/mhashizume))
13
+
5
14
  ## [3.0.1](https://github.com/puppetlabs/beaker-puppet/tree/3.0.1) (2024-03-12)
6
15
 
7
16
  [Full Changelog](https://github.com/puppetlabs/beaker-puppet/compare/3.0.0...3.0.1)
@@ -29,6 +29,6 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency 'beaker-vmpooler', '~> 1.4'
30
30
 
31
31
  # Run time dependencies
32
- s.add_runtime_dependency 'beaker', '~> 5.0'
32
+ s.add_runtime_dependency 'beaker', '>= 5.0', '< 7'
33
33
  s.add_runtime_dependency 'oga', '~> 3.4'
34
34
  end
@@ -303,7 +303,7 @@ module Beaker
303
303
  family = ::Regexp.last_match(1)
304
304
  relver = ::Regexp.last_match(2)
305
305
  install_puppet_from_rpm_on(host, opts.merge(release: relver, family: family))
306
- elsif host['platform'] =~ /(ubuntu|debian|huaweios)/
306
+ elsif host['platform'] =~ /(ubuntu|debian)/
307
307
  install_puppet_from_deb_on(host, opts)
308
308
  elsif host['platform'] =~ /windows/
309
309
  relver = opts[:version]
@@ -406,10 +406,10 @@ module Beaker
406
406
  end
407
407
 
408
408
  case host['platform']
409
- when /amazon|el-|redhat|fedora|sles|centos|cisco_/
409
+ when /amazon|el-|redhat|fedora|sles|centos/
410
410
  package_name = 'puppet-agent'
411
411
  package_name << "-#{opts[:puppet_agent_version]}" if opts[:puppet_agent_version]
412
- when /debian|ubuntu|huaweios/
412
+ when /debian|ubuntu/
413
413
  package_name = 'puppet-agent'
414
414
  if opts[:puppet_agent_version]
415
415
  package_name << "=#{opts[:puppet_agent_version]}-1#{host['platform'].codename}"
@@ -921,9 +921,9 @@ module Beaker
921
921
 
922
922
  unless host.check_for_command('gem')
923
923
  gempkg = case host['platform']
924
- when /solaris-11/ then 'ruby-18'
925
- when /ubuntu-14/ then 'ruby'
926
- when /solaris-10|ubuntu|debian|el-|huaweios/ then 'rubygems'
924
+ when /solaris-11/ then 'ruby-18'
925
+ when /ubuntu-14/ then 'ruby'
926
+ when /solaris-10|ubuntu|debian|el-/ then 'rubygems'
927
927
  when /openbsd/ then 'ruby'
928
928
  else
929
929
  raise 'install_puppet() called with default_action ' +
@@ -937,7 +937,7 @@ module Beaker
937
937
  # Link 'gem' to /usr/bin instead of adding /opt/csw/bin to PATH.
938
938
  on host, 'ln -s /opt/csw/bin/gem /usr/bin/gem' if is_solaris10
939
939
 
940
- if host['platform'] =~ /debian|ubuntu|solaris|huaweios/
940
+ if host['platform'] =~ /debian|ubuntu|solaris/
941
941
  gem_env = YAML.load(on(host, 'gem environment').stdout)
942
942
  gem_paths_array = gem_env['RubyGems Environment'].find { |h| h['GEM PATHS'] != nil }['GEM PATHS']
943
943
  path_with_gem = 'export PATH=' + gem_paths_array.join(':') + ':${PATH}'
@@ -993,16 +993,8 @@ module Beaker
993
993
  opts = sanitize_opts(opts)
994
994
 
995
995
  case variant
996
- when /^(amazon|fedora|el|redhat|centos|sles|cisco_nexus|cisco_ios_xr)$/
996
+ when /^(amazon|fedora|el|redhat|centos|sles)$/
997
997
  variant_url_value = (%w[redhat centos].include?(::Regexp.last_match(1)) ? 'el' : ::Regexp.last_match(1))
998
- if variant == 'cisco_nexus'
999
- variant_url_value = 'cisco-wrlinux'
1000
- version = '5'
1001
- end
1002
- if variant == 'cisco_ios_xr'
1003
- variant_url_value = 'cisco-wrlinux'
1004
- version = '7'
1005
- end
1006
998
  if repo_name.match(/puppet\d*/)
1007
999
  url = if repo_name.match(/-nightly$/)
1008
1000
  opts[:nightly_yum_repo_url]
@@ -1028,19 +1020,11 @@ module Beaker
1028
1020
  end
1029
1021
  end
1030
1022
 
1031
- if variant == 'cisco_nexus'
1032
- # cisco nexus requires using yum to install the repo
1033
- host.install_package(remote)
1034
- elsif variant == 'cisco_ios_xr'
1035
- # cisco ios xr requires using yum to localinstall the repo
1036
- on host, "yum -y localinstall #{remote}"
1037
- else
1038
- opts[:package_proxy] ||= false
1039
- host.install_package_with_rpm(remote, '--replacepkgs',
1040
- { package_proxy: opts[:package_proxy] })
1041
- end
1023
+ opts[:package_proxy] ||= false
1024
+ host.install_package_with_rpm(remote, '--replacepkgs',
1025
+ { package_proxy: opts[:package_proxy] })
1042
1026
 
1043
- when /^(debian|ubuntu|huaweios)$/
1027
+ when /^(debian|ubuntu)$/
1044
1028
  if repo_name.match(/puppet\d*/)
1045
1029
  url = if repo_name.match(/-nightly$/)
1046
1030
  opts[:nightly_apt_repo_url]
@@ -1111,14 +1095,10 @@ module Beaker
1111
1095
  File.write(repo, contents)
1112
1096
  end
1113
1097
 
1114
- to_path = if host[:platform] =~ /cisco_nexus/
1115
- "#{host.package_config_dir}/#{File.basename(repo)}"
1116
- else
1117
- host.package_config_dir
1118
- end
1098
+ to_path = host.package_config_dir
1119
1099
  scp_to(host, repo, to_path)
1120
1100
 
1121
- on(host, 'apt-get update') if host['platform'] =~ /ubuntu-|debian-|huaweios-/
1101
+ on(host, 'apt-get update') if host['platform'] =~ /ubuntu-|debian-/
1122
1102
  nil
1123
1103
  end
1124
1104
 
@@ -1148,7 +1128,7 @@ module Beaker
1148
1128
  repo_configs_dir = nil,
1149
1129
  opts = options)
1150
1130
  variant, version, arch, codename = host['platform'].to_array
1151
- if variant !~ /^(amazon|fedora|el|redhat|centos|debian|ubuntu|huaweios|cisco_nexus|cisco_ios_xr|sles)$/
1131
+ if variant !~ /^(amazon|fedora|el|redhat|centos|debian|ubuntu|sles)$/
1152
1132
  raise "No repository installation step for #{variant} yet..."
1153
1133
  end
1154
1134
 
@@ -1181,7 +1161,7 @@ module Beaker
1181
1161
  # @note This method is paired to be run directly after {#install_puppetlabs_dev_repo}
1182
1162
  #
1183
1163
  def install_packages_from_local_dev_repo(host, package_name)
1184
- if host['platform'] =~ /debian|ubuntu|huaweios/
1164
+ if host['platform'] =~ /debian|ubuntu/
1185
1165
  find_filename = '*.deb'
1186
1166
  find_command = 'dpkg -i'
1187
1167
  elsif host['platform'] =~ /fedora|el|redhat|centos/
@@ -1269,7 +1249,7 @@ module Beaker
1269
1249
 
1270
1250
  # We have to do some silly version munging if we're on a deb-based platform
1271
1251
  case host['platform']
1272
- when /debian|ubuntu|huaweios/
1252
+ when /debian|ubuntu/
1273
1253
  opts[:version] = "#{opts[:version]}-1#{host['platform'].codename}" if opts[:version]
1274
1254
  end
1275
1255
 
@@ -1291,7 +1271,7 @@ module Beaker
1291
1271
  cmdline_args = ''
1292
1272
  # query packages
1293
1273
  case host[:platform]
1294
- when /huaweios|ubuntu/
1274
+ when /ubuntu/
1295
1275
  pkgs = on(host, "dpkg-query -l | awk '{print $2}' | grep -E '(^pe-|puppet)'",
1296
1276
  acceptable_exit_codes: [0, 1]).stdout.chomp.split(/\n+/)
1297
1277
  when /aix|sles|el|redhat|centos|oracle|scientific/
@@ -1,3 +1,3 @@
1
1
  module BeakerPuppet
2
- VERSION = '3.0.1'
2
+ VERSION = '4.0.0'
3
3
  end
@@ -818,48 +818,6 @@ describe ClassMixedWithDSLInstallUtils do
818
818
  subject.install_puppetlabs_release_repo_on(host)
819
819
  end
820
820
  end
821
-
822
- context 'on debian 8' do
823
- let(:platform) { Beaker::Platform.new('debian-8-i386') }
824
- it 'returns the correct url when repo is set to puppet4' do
825
- expect(subject).to receive(:on).with(host, /puppet4-release-jessie\.deb$/).once
826
- expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
827
- expect(subject).to receive(:on).with(host, 'apt-get update').once
828
- subject.install_puppetlabs_release_repo_on(host, 'puppet4')
829
- end
830
- it 'returns the correct url when opts[:puppet_collection] is set to puppet7' do
831
- expect(subject).to receive(:on).with(host, /puppet7-release-jessie\.deb$/).once
832
- expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
833
- expect(subject).to receive(:on).with(host, 'apt-get update').once
834
- subject.install_puppetlabs_release_repo_on(host, nil, { puppet_collection: 'puppet7' })
835
- end
836
- it 'returns the correct url when both repo and opts[:puppet_collection] are nil' do
837
- expect(subject).to receive(:on).with(host, /puppet-release-jessie\.deb$/).once
838
- expect(subject).to receive(:on).with(host, 'dpkg -i --force-all /tmp/puppet.deb').once
839
- expect(subject).to receive(:on).with(host, 'apt-get update').once
840
- subject.install_puppetlabs_release_repo_on(host)
841
- end
842
- end
843
-
844
- context 'on cisco platforms' do
845
- context 'version 5' do
846
- let(:platform) { Beaker::Platform.new('cisco_nexus-7-x86_64') }
847
-
848
- it 'calls host.install_package' do
849
- expect(host).to receive(:install_package).with(/\.rpm$/)
850
- subject.install_puppetlabs_release_repo_on(host)
851
- end
852
- end
853
-
854
- context 'version 7' do
855
- let(:platform) { Beaker::Platform.new('cisco_ios_xr-6-x86_64') }
856
-
857
- it 'uses yum localinstall to install the package' do
858
- expect(subject).to receive(:on).with(host, /^yum.*localinstall.*\.rpm$/)
859
- subject.install_puppetlabs_release_repo_on(host)
860
- end
861
- end
862
- end
863
821
  end
864
822
 
865
823
  describe '#install_puppetlabs_dev_repo' do
@@ -884,6 +842,8 @@ describe ClassMixedWithDSLInstallUtils do
884
842
  allow(rez).to receive(:exit_code) { 0 }
885
843
  allow(subject).to receive(:link_exists?).and_return(true)
886
844
  expect(subject).to receive(:scp_to).with(host, repo_config, /.*/).ordered
845
+ allow(File).to receive(:read).and_call_original
846
+ allow(File).to receive(:read).with('repoconfig').and_return('')
887
847
  subject.install_puppetlabs_dev_repo host, package_name, package_version
888
848
  end
889
849
  end
@@ -960,7 +920,7 @@ describe ClassMixedWithDSLInstallUtils do
960
920
  end
961
921
 
962
922
  it 'fails correctly for systems not accounted for' do
963
- @platform = 'eos-1-3'
923
+ @platform = 'freebsd-1-3'
964
924
  expect { subject.install_packages_from_local_dev_repo(host, package_name) }.to raise_error RuntimeError
965
925
  end
966
926
  end
@@ -1108,10 +1068,10 @@ describe ClassMixedWithDSLInstallUtils do
1108
1068
  version = '6.6.6'
1109
1069
 
1110
1070
  context 'on deb-based platform' do
1111
- let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-16.04-amd64')) }
1112
- it 'munges the version on ubuntu 16.04' do
1071
+ let(:host) { make_host('master', platform: Beaker::Platform.new('ubuntu-24.04-amd64')) }
1072
+ it 'munges the version on ubuntu 24.04' do
1113
1073
  expect(subject).to receive(:install_puppetlabs_release_repo_on).with(host, 'puppet', anything)
1114
- expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-1xenial")
1074
+ expect(subject).to receive(:install_package).with(host, 'puppetserver', "#{version}-1noble")
1115
1075
  allow(subject).to receive(:dev_builds_accessible_on?).with(host, anything).and_return false
1116
1076
  subject.install_puppetserver_on(host, version: version)
1117
1077
  end
data/spec/helpers.rb CHANGED
@@ -120,9 +120,7 @@ module HostHelpers
120
120
  end
121
121
 
122
122
  module PlatformHelpers
123
- DEBIANPLATFORMS = %w[debian
124
- ubuntu
125
- huaweios]
123
+ DEBIANPLATFORMS = %w[debian ubuntu]
126
124
 
127
125
  FEDORASYSTEMD = (14..29).to_a.collect! { |i| "fedora-#{i}" }
128
126
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-12 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fakefs
@@ -104,16 +104,22 @@ dependencies:
104
104
  name: beaker
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - "~>"
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: '5.0'
110
+ - - "<"
111
+ - !ruby/object:Gem::Version
112
+ version: '7'
110
113
  type: :runtime
111
114
  prerelease: false
112
115
  version_requirements: !ruby/object:Gem::Requirement
113
116
  requirements:
114
- - - "~>"
117
+ - - ">="
115
118
  - !ruby/object:Gem::Version
116
119
  version: '5.0'
120
+ - - "<"
121
+ - !ruby/object:Gem::Version
122
+ version: '7'
117
123
  - !ruby/object:Gem::Dependency
118
124
  name: oga
119
125
  requirement: !ruby/object:Gem::Requirement