Skip to content

Commit

Permalink
Merge pull request #1681 from mchllweeks/QENG-5106v2
Browse files Browse the repository at this point in the history
(maint) Fix facter tests to run on EC2 hosts
  • Loading branch information
ScottGarman committed Jan 9, 2018
2 parents 170103d + fb17118 commit e1ea736
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions acceptance/lib/facter/acceptance/base_fact_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ def el_expected_facts(agent)
os_name = 'OracleLinux'
when /scientific/
os_name = 'Scientific'
when /amazon/
os_name = 'Amazon'
os_version = '2017'
else
os_name = 'RedHat'
end
Expand Down
6 changes: 3 additions & 3 deletions acceptance/tests/facts/dmi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
'dmi.product.uuid' => /[-0-9A-Fa-f]+/,
})
end
unless agent['platform'] =~ /windows|cisco|aarch64/
unless agent['platform'] =~ /windows|cisco|aarch64|el-/
expected_facts.merge!({'dmi.chassis.asset_tag' => /\w+/})
end
unless agent['platform'] =~ /cisco|aarch64/
unless agent['platform'] =~ /cisco|aarch64|el-/
expected_facts.merge!({'dmi.product.serial_number' => /\w+/})
end
unless agent['platform'] =~ /windows|cisco|solaris|aarch64/
unless agent['platform'] =~ /windows|cisco|solaris|aarch64|el-/
expected_facts.merge!({'dmi.board.asset_tag' => /\w+|/,
'dmi.board.manufacturer' => /\w+/,
'dmi.board.product' => /\w+/,
Expand Down

0 comments on commit e1ea736

Please sign in to comment.