You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run cookstyle against valid Chefspec file and specify ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023')
Steps to Reproduce:
Create any Chefspec spec.rb file and specify ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023')
Expected Result:
No error message about not being a supported platform,
Actual Result:
When running cookstyle get the error that Amazon 2023 is not supported.
spec/unit/recipes/default_spec.rb:184:7: W: Chef/Deprecations/DeprecatedChefSpecPlatform: Use currently supported platforms in ChefSpec listed at https://github.com/ch efspec/fauxhai/blob/main/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific ie. 10 instead of 10. 3 (https://docs.chef.io/workstation/cookstyle/chef_deprecations_deprecatedchefspecplatform)
ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023') do |node|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Something additional to note is that cookstyle does not fail when the block is defined this way
[
{ platform: 'amazon', version: '2023' },
].each do |platform_info|
context "on #{platform_info[:platform].capitalize} #{platform_info[:version]}" do
let :solo do
ChefSpec::ServerRunner.new(platform: platform_info[:platform], version: platform_info[:version]) do |node|
Version:
All
Environment:
All
Scenario:
Run cookstyle against valid Chefspec file and specify
ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023')
Steps to Reproduce:
Create any Chefspec spec.rb file and specify
ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023')
Expected Result:
No error message about not being a supported platform,
Actual Result:
When running
cookstyle
get the error that Amazon 2023 is not supported.spec/unit/recipes/default_spec.rb:184:7: W: Chef/Deprecations/DeprecatedChefSpecPlatform: Use currently supported platforms in ChefSpec listed at https://github.com/ch efspec/fauxhai/blob/main/PLATFORMS.md. Fauxhai / ChefSpec will perform fuzzy matching on platform version so it's always best to be less specific ie. 10 instead of 10. 3 (https://docs.chef.io/workstation/cookstyle/chef_deprecations_deprecatedchefspecplatform)
ChefSpec::ServerRunner.new(platform: 'amazon', version: '2023') do |node|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Source of the problem
Code is pointing to the no longer maintained https://github.com/chefspec/fauxhai versus the Chef maintained https://github.com/chef/fauxhai.
The text was updated successfully, but these errors were encountered: