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
Since ChefSpec now has no notion of an add_apt_repository matcher.
Should ChefSpec be responsible for including matchers for resources that are being ported from cookbooks to core? It seems so, and will need the addition of @not_chef_xxx block prior to a test example, like this one
How will ChefSpec behave when there are multiple matchers of the same name, in the event that a user decides to continue to use the external cookbook?
Is it desirable to create a PR with the new resource for the next version of ChefSpec?
The text was updated successfully, but these errors were encountered:
Thank you for opening an issue. ChefSpec should be responsible for including those matchers, but I typically wait a few weeks until there's more adoption of the release.
This is a bit of an edge case, but I think ChefSpec should prefer the cookbook-defined matcher over the core. This allows users to customize matcher behavior and doesn't break bc (i.e. someone currently using the cookbook doesn't suddenly inherit a new matcher on a CS upgrade). I, however, have to figure out how to do that 😄
Is it desirable to create a PR with the new resource for the next version of ChefSpec?
Yes, but I think I need to build some kind of framework in core that provides a method like matcher_defined? first.
In chef/chef#4782 the
apt_repository
resource has been ported to core chef, released in 12.9.37.When using the
apt
cookbook, (which provides matchers), a warning is emitted, due to two providers existing at the same time.This is expected behavior, as far as I can tell.
However, when removing the use of the apt cookbook from
metadata.rb
, a failure is raised:Since ChefSpec now has no notion of an
add_apt_repository
matcher.@not_chef_xxx
block prior to a test example, like this oneThe text was updated successfully, but these errors were encountered: