k1LoW / awspec

RSpec tests for your AWS resources.
MIT License
1.17k stars 194 forks source link

Subnet finder missing by_cidr method #549

Closed macinnisrob closed 2 years ago

macinnisrob commented 2 years ago

When doing an alb have_subnet with a cidr block, awspec throws:

Failure/Error: it { is_expected.to have_subnet('10.0.0.0/16') }

     NoMethodError:
       undefined method `by_cidr' for #<Awspec::Helper::Finder::Subnet::SubnetCache:0x00007fd41ff00258>

I assume it's throwing here https://github.com/k1LoW/awspec/pull/538/files#diff-9b33d0d832b695cfa93c85319855a8b9e78d5b2aaf6005b06ff68d8c5745b332R112.

It works with a subnet id, so the rest of that PR seems fine.

k1LoW commented 2 years ago

Thank you for your report!! Released as v1.25.1.