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

[help-needed] How to write failed resource id to a file #717

Open
CsBigDataHub opened this issue Feb 23, 2023 · 0 comments
Open

[help-needed] How to write failed resource id to a file #717

CsBigDataHub opened this issue Feb 23, 2023 · 0 comments

Comments

@CsBigDataHub
Copy link

I have this code below,

control 'all_azure_resourses' do
  desc 'Get all resource to filter maually created resourses'
  azure_generic_resources.ids.each do |id|
    describe azure_generic_resource(resource_id: id) do
      its('tags') { should include(:'managed-by') }
      its('tags') { should include('managed-by': 'terraform') }
    end
  end
end

How to capture resource_id of failed resources for its('tags') { should include('managed-by': 'terraform') } test?

I would like to write these resource_id's and failed test description to a file.

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

No branches or pull requests

1 participant