k1LoW / awspec

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

Support for testing a record set without a record value #461

Closed tatsuyafw closed 5 years ago

tatsuyafw commented 5 years ago

Fixes #318.

The have_record_set matcher always required a value as below:

describe route53_hosted_zone('foo.') do
  it { should have_record_set('bar.foo.').a('192.168.0.1') }
end

But, as discussed in #318, sometimes want to test a record set regardless of a value of record.

This PR enables awspec user test a record without its value as below:

describe route53_hosted_zone('foo.') do
  # Test if a hosted zone has a given record.
  it { should have_record_set('bar.foo.') }

  # Test if a hosted zone has a given record and a given type.
  it { should have_record_set('bar.foo.').type('a') }
end

What do you think about this PR?. I would appreciate receiving a feedback.

k1LoW commented 5 years ago

@tatsuyafw !!!!! GREAT FIXXX THANK YOU !!!!

k1LoW commented 5 years ago

Released as v1.17.1.