Skip to content

Commit

Permalink
Drop EoL EL4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 10, 2024
1 parent ce9e934 commit e312794
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
9 changes: 0 additions & 9 deletions lib/beaker/host/unix/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ def check_for_package(name, opts = {})
self[:sles_rpmkeys_nightly_pl_imported] = true
end
result = execute("zypper --gpg-auto-import-keys se -i --match-exact #{name}", opts) { |result| result }
when /el-4/
@logger.debug("Package query not supported on rhel4")
return false
when /amazon|cisco|fedora|centos|redhat|eos|el-/
result = execute("rpm -q #{name}", opts) { |result| result }
when /ubuntu|debian/
Expand Down Expand Up @@ -85,8 +82,6 @@ def install_package(name, cmdline_args = '', version = nil, opts = {})
case self['platform']
when /opensuse|sles-/
execute("zypper --non-interactive --gpg-auto-import-keys in #{name}", opts)
when /el-4/
@logger.debug("Package installation not supported on rhel4")
when /amazon-2023|el-(8|9|1[0-9])|fedora/
name = "#{name}-#{version}" if version
execute("dnf -y #{cmdline_args} install #{name}", opts)
Expand Down Expand Up @@ -170,8 +165,6 @@ def uninstall_package(name, cmdline_args = '', opts = {})
case self['platform']
when /opensuse|sles-/
execute("zypper --non-interactive rm #{name}", opts)
when /el-4/
@logger.debug("Package uninstallation not supported on rhel4")
when /amazon-2023|el-(8|9|1[0-9])|fedora/
execute("dnf -y #{cmdline_args} remove #{name}", opts)
when /cisco|centos|redhat|eos|el-[1-7]-/
Expand Down Expand Up @@ -200,8 +193,6 @@ def upgrade_package(name, cmdline_args = '', opts = {})
case self['platform']
when /opensuse|sles-/
execute("zypper --non-interactive --no-gpg-checks up #{name}", opts)
when /el-4/
@logger.debug("Package upgrade is not supported on rhel4")
when /fedora-(2[2-9]|3[0-9])/
execute("dnf -y #{cmdline_args} update #{name}", opts)
when /cisco|fedora|centos|redhat|eos|el-/
Expand Down
4 changes: 2 additions & 2 deletions lib/beaker/options/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ def normalize_args

@validator.validate_master_count(master)

# check that windows/el-4 boxes are only agents (solaris can be a master in foss cases)
# check that windows boxes are only agents (solaris can be a master in foss cases)
@options[:HOSTS].each_key do |name|
host = @options[:HOSTS][name]
test_host_roles(name, host) if /windows|el-4/.match?(host[:platform])
test_host_roles(name, host) if host[:platform] == 'windows'

# check to see if a custom user account has been provided, if so use it
host[:user] = host[:ssh][:user] if host[:ssh] && host[:ssh][:user]
Expand Down
6 changes: 0 additions & 6 deletions spec/beaker/host/unix/pkg_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,6 @@ def exec
expect(instance.check_for_package(pkg)).to be === true
end

it "returns false for el-4" do
@opts = { 'platform' => 'el-4-is-me' }
pkg = 'el-4_package'
expect(instance.check_for_package(pkg)).to be === false
end

it "raises on unknown platform" do
@opts = { 'platform' => 'nope-is-me' }
pkg = 'nope_package'
Expand Down
1 change: 0 additions & 1 deletion spec/beaker/options/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ def fake_hosts_file_for_platform(hosts, platform)

context "restricts agents" do
it_behaves_like('a platform supporting only agents', 'windows-version-arch')
it_behaves_like('a platform supporting only agents', 'el-4-arch')
end

context "ssh user" do
Expand Down

0 comments on commit e312794

Please sign in to comment.