Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still points to old https://github.com/chefspec/fauxhai not https://github.com/chef/fauxhai #977

Open
jjperry opened this issue Aug 6, 2024 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@jjperry
Copy link

jjperry commented Aug 6, 2024

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.

@jjperry jjperry added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Aug 6, 2024
@jjperry
Copy link
Author

jjperry commented Aug 6, 2024

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|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant