Skip to content

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

@CsBigDataHub

Description

@CsBigDataHub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions