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

Update dependency chefspec to v9 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mend-5034428[bot]
Copy link

@mend-5034428 mend-5034428 bot commented Oct 19, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
chefspec (source) '~> 4.3' -> '~> 9.3', '>= 9.3.8' age adoption passing confidence

Release Notes

chefspec/chefspec (chefspec)

v9.3.3

Compare Source

  • Fix a failure running chefspec with Policyfiles

v9.3.2

Compare Source

  • Remove a hack in the Hash class that worked around issues in Windows previously
  • Fix ChefSpec does not automatically install cookbooks from chef server when using Policyfile.rb
  • Remove Travis CI config

v9.3.1

Compare Source

  • Resolved an error that could cause failures with some resources

v9.3.0

Compare Source

  • Add support for resources that include a description value in the action
  • Require Ruby 2.5+ and Chef Infra Client 15+
  • Add support for Ruby 3

v9.2.1

Compare Source

  • Improve performance by only requiring external libraries if they are not already loaded
  • Expand testing to additional releases of Chef Infra Client

v9.2.0

Compare Source

  • Updated stubs_for_resource stubbing for the new after_resource state in Chef Infra Client 16.
  • Added support for Ohai segments in cookbooks
  • Resolved warnings when running on Ruby 2.7+

v9.1.0

Compare Source

  • Added a new include_any_recipe matcher which allows you to write ChefSpecs that ensure a cookbook does not include recipes. Thanks @​jasonwbarnett
  • Fixed stubbing of Chef::Provider when using Poise's resource_provider_mixin. Thanks @​Annih
  • Switched require statements to require_relative to speed up requiring libraries in ChefSpec

v9.0.0

Compare Source

  • The fauxhai dependency has been switched to the fauxhai-ng. Fauxhai-ng is the original source of the fauxhai project in the chefspec GitHub org, but with a new name. This is considered a major update as it forces users to upgrade to use fauxhai-ng >= 7.5 where as the previous ChefSpec release allowed for fauxhai >= 6.11.

v8.0.1

Compare Source

  • Added back the ChefSpec report templates until the time that we fully remove the report feature.

v8.0.0

Compare Source

  • ChefSpec now requires Ruby 2.4+ and Chef 14+. Keep in mind that you can still test cookbooks designed for older versions of Chef Infra Client, but you'll need a somewhat modern chef gem to run ChefSpec.
  • ChefSpec now depends on the new chef-cli gem, which provides Chef Policyfiles functionality. This means you can now use ChefSpec to test Policyfiles without needing to run those tests from within ChefDK or Chef Workstation. Gem install chefspec!

v7.4.0

Compare Source

  • Require Ruby 2.3+, Chef 13+, and Fauxhai 6.11+
  • The majority of examples have been updated for the new ChefSpec 7.3+ format
  • Properly loaded mixlib/shellout before trying to stub commands to prevent some failures
  • Added a new policyfile_path configuration option for specifying the path to the PolicyFile

v7.3.4

Compare Source

  • Add back the spec files to the gem package for testing within Chef-DK

v7.3.3

Compare Source

  • Slimmed the size of the gem install down by not shipping test / development or example files in the gem artifact. These will remain in the repo for reference and testing.
  • Updated the homepage in the Gemspec to be the Github repo
  • Improved the stubbing documentation in the readme

v7.3.2

Compare Source

  • Improve runner construction code
  • Make options to receive_shell_out work a bit better.

v7.3.1

Compare Source

  • Add additional hooks for customizing the runner creation process.

v7.3.0

Compare Source

  • Major syntax overhaul and update. Check out the README for examples of the updated syntax. The older syntax is still present and will be supported at least until ChefSpec 8.0, but documentation has been moved to README_old.

v7.2.1

Compare Source

  • Updated an example and test for that example

v7.2.0

Compare Source

  • The fauxhai dependency is no longer constrained. This removes the need to release a new version of Chefspec each time a major release of Fauxhai is released. Previously Fauxhai was constraine to < 6. The current release is 6.1.0, which includes significant new platform data and dumps that are updated for Chef 14.

v7.1.2

Compare Source

This release deprecated the spec coverage feature, which will be removed in a future release. In general this feature leads to users writing unnecessary and generally useless specs in an attempt to reach 100% spec coverage. ChefSpec is useful for testing the parts of your cookbook that include logic, but if a particular resource has no logic behind it, then there's little value in testing. We shouldn't provide a mechanism that encourages writing unnecessary specs that give a false assurance test coverage.

v7.1.1

Compare Source

  • Better support for matching action :nothing in resources

v7.1.0

Compare Source

  • Resource matchers are now generated automatically. What does this mean for you? A lot:

    1. You won't have to worry about older releases of ChefSpec not knowing about new resources in chef-client.
    2. You won't have to define the matchers in your cookbook code, which also means you won't have issues if a community cookbook lacks matchers
  • Removed the usage of Cucumber for testing

  • Removed all test deps from the Gemspec

  • Added a warning about stubbing core Ruby methods and the issues that can cause

v7.0.0

Compare Source

  • Increased the chef gem dependency from 12.6+ to 12.14+. Since ChefSpec is consumed within ChefDK this actually has a minor impact on end users who generally consume Chefspec via ChefDK, which will bundle both compatible chef and chefspec releases.
  • Fixed incompatibilities with Chef 13.
  • Loosened the Fauxhai dependency to allow for the upcoming Fauxhai 5.0 release.
  • Removed easy_install_package testing and examples as easy_install_package was removed in Chef 13. The actual matcher is still present for users with existing specs against Chef 12 cookbooks.
  • Added additional testing and an example for LWRPs with use_inline_resources defined.
  • Added testing against Chef 13 and Ruby 2.4.
  • Removed code that supported Chef < 12.5.

v6.2.0

Compare Source

  • Correctly handle the block form of search() when using stubs
  • Add support for alternative reporting output from Coverage.report!

v6.1.0

Compare Source

v6.0.1

Compare Source

  • Add the ability to set the Chef Zero port range used by the ServerRunner

v6.0.0

Compare Source

BREAKING CHANGES

ChefSpec now requires Ruby 2.2 or later.

IMPROVEMENTS

  • Improve ServerRunner speed and reduce process hangs by using a single stand-alone chef-zero server.
  • Add configuration value to dictate whether cookbooks are re-uploaded before every test context.
  • Added matchers for dnf_package, msu_package, and cab_package

v5.4.0

Compare Source

IMPROVEMENTS

  • Support for in-memory or on-disk ChefZero Servers. See README for usage details.

UPDATES

  • While Chef 12.0 - 12.5 are still supported, they are no longer being tested.

v5.3.0

Compare Source

IMPROVEMENTS

  • Added all missing matchers for built-in chef-client resources

    • osx_profile
    • zypper_package
    • systemd_unit
    • openbsd_package
    • launchd
    • homebrew_package
    • bff_package

BUG FIXES

  • Fixed readme examples to properly specify the platform / platform version and to use a cache dir that will work on Windows

v5.2.0

Compare Source

IMPROVEMENTS

  • Added platform and versions to all examples to avoid deprecation warnings from Fauxhai
  • Allow modifications to node object before converge

BUG FIXES

  • Fix makecache matcher for yum_repository

v5.1.1

Compare Source

BUG FIXES

  • Add missing matchers for yum_repository

v5.1.0

Compare Source

IMPROVEMENTS

  • Add dsc_script matcher
  • Add yum_repository matcher
  • Resolve cookstyle warnings in example recipes and specs
  • Mock out platforms in the example specs so they're easier to adopt
  • Switch all example specs to SoloRunner as this is the preferred runner for Chef Server / Chef Zero users

BUG FIXES

  • Fixes apt_update and apt_repository matchers to work

v5.0.0

Compare Source

IMPROVEMENTS

  • Require a minimum of Chef 12.0
  • Add custom templating to Coverage Reporting. See readme for details
  • Add matcher for apt_repository resource
  • Add matcher for apt_update resource
  • Add support for the :before notification
  • Allow stubbing encrypted databags loaded with data_bag_item
  • Add testing against Chef 12.8 - 12.3

BUG FIXES

  • Update docs/examples to use node.normal instead of node.set, which has been deprecated
  • Update user spec examples to specify the platform
  • Update docs to clarify the Ruby 2.1 requirement

v4.7.0

Compare Source

IMPROVEMENTS

  • Support Chef Solo actually being local mode (per Chef RFC 31)

v4.6.1

Compare Source

BUG FIXES

  • Use the same Chef :file_cache_path in every ChefSpec converge to prevent large numbers of LWRP deprecation warnings
  • Require Fauxhai ~3.2 to prevent ChefSpec spec failures
  • Require Rake < 11.0 to prevent failures

v4.6.0

Compare Source

IMPROVEMENTS

  • Add support for adding berkshelf_options to the RSpec config
  • Add chocolately_package matchers
  • Support do..end style syntax in block expectations
  • Output a diff when multi-line resource parameters are unmatched

BUG FIXES

  • Update tests to include better descriptions and feature names
  • Add support for Policyfile workflow

v4.5.0

Compare Source

IMPROVEMENTS

  • Update Fauxhai dependency to 3.0 to bring in newly generated mocked Ohai data

v4.4.0

Compare Source

BUG FIXES

  • Documentation improvements (using regex in stubbed commands, chef 12+ custom matcher gotchas)
  • Spec suite improvements (dsc resource specs, platform specific configurations)
  • Chef 12+ platform specific resource loading related error

IMPROVEMENTS

  • Support for policy files

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants