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

Make transit_gateway have_attachment work with names #586

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

alexjfisher
Copy link
Contributor

With this change, it is now possible to check transit gateways have attachments based on the attachment name instead of just id. The name can either be a string or a regex.

have_attachment now also works if should exist hasn't been called first (where @id wasn't initialised).

atts = find_tgw_attachments_by_tgw_id(@id)
ret = atts.find_all { |att| att.transit_gateway_attachment_id == att_id }
ret.any?
atts = find_tgw_attachments_by_tgw_id(id)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specific bugfix on this line changing @id to id as @id wasn't initialised if should exist hadn't been called first.

With this change, it is now possible to check transit gateways have
attachments based on the attachment name instead of just id. The name
can either be a string or a regex.

`have_attachment` now also works if `should exist` hasn't been called
first (where `@id` wasn't initialised).
@k1LoW k1LoW merged commit a51e62a into k1LoW:master Apr 16, 2024
@k1LoW
Copy link
Owner

k1LoW commented Apr 16, 2024

@alexjfisher Thank you!!! I am very sorry for the delay in merging.

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.

None yet

2 participants