Skip to content

Commit

Permalink
(PA-5948): Updated host generator to use aarch64 for amazon linnux
Browse files Browse the repository at this point in the history
  • Loading branch information
span786 committed Nov 20, 2023
1 parent 64f3152 commit 40fa043
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/beaker-hostgenerator/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def generate_osinfo

# Amazon Linux
yield %w[amazon2023-64 amazon-2023-x86_64]
yield %w[amazon2023-AARCH64 amazon-2023-arm64]
yield %w[amazon2023-AARCH64 amazon-2023-aarch64]

Check warning on line 1114 in lib/beaker-hostgenerator/data.rb

View check run for this annotation

Codecov / codecov/patch

lib/beaker-hostgenerator/data.rb#L1114

Added line #L1114 was not covered by tests

# AlmaLinux and Rocky
%w[almalinux rocky].each do |os|
Expand Down
4 changes: 2 additions & 2 deletions lib/beaker-hostgenerator/hypervisor/abs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def generate_node(node_info, base_config, bhg_version)
case node_info['ostype']
when /^(almalinux|centos|oracle|redhat|rocky|scientific)/
base_config['template'] ||= base_config['platform']&.gsub(/^el/, ::Regexp.last_match(1))
when /^aix/, /^amazon/, /^fedora/, /^opensuse/, /^panos/
when /^aix/, /^fedora/, /^opensuse/, /^panos/

Check warning on line 28 in lib/beaker-hostgenerator/hypervisor/abs.rb

View check run for this annotation

Codecov / codecov/patch

lib/beaker-hostgenerator/hypervisor/abs.rb#L28

Added line #L28 was not covered by tests
base_config['template'] ||= base_config['platform']
when /^(debian|ubuntu)/
when /^(debian|ubuntu|amazon)/

Check warning on line 30 in lib/beaker-hostgenerator/hypervisor/abs.rb

View check run for this annotation

Codecov / codecov/patch

lib/beaker-hostgenerator/hypervisor/abs.rb#L30

Added line #L30 was not covered by tests
os = Regexp.last_match(1)
base_template = node_info['ostype'].sub(os, "#{os}-")
arch = case node_info['bits']
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/generated/default/amazon2023-AARCH64aulcdfm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment_variables: {}
expected_hash:
HOSTS:
amazon2023-AARCH64-1:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment_variables: {}
expected_hash:
HOSTS:
amazon2023-AARCH64-1:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand All @@ -22,7 +22,7 @@ expected_hash:
roles:
- agent
amazon2023-AARCH64-2:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ expected_hash:
- agent
- frictionless
amazon2023-AARCH64-1:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment_variables: {}
expected_hash:
HOSTS:
amazon2023-AARCH64-1:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ environment_variables: {}
expected_hash:
HOSTS:
amazon2023-AARCH64-1:
platform: amazon-2023-arm64
platform: amazon-2023-aarch64
hypervisor: vmpooler
roles:
- agent
Expand Down

0 comments on commit 40fa043

Please sign in to comment.