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

Let render_file match any resource that matches path (#858) #1029

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

Conversation

adsr
Copy link

@adsr adsr commented May 12, 2023

While testing a recipe with something like this:

template path do
  only_if { cond }
  ...
end

file path do
  not_if { cond }
  action :delete
end

When cond was true, RenderFileMatcher was not matching because the file resource would supersede the template resource.

The patch makes it so any (cookbook_file|file|template) resource that matches the given path and content will satsify the assertion.

Fixes #858

@tpowell-progress
Copy link

@adsr if you are still interested in getting this merged, please resubmit to chef/chefspec

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