k1LoW/awspec

have_record_set passes tests in non-existent route53 record.

thebeasty opened this issue · 0 comments

When testing for non-existent route53 record, the check always passes.

route53_hosted_zone_spec.rb:

require 'spec_helper'

describe route53_hosted_zone('example.local.') do
  its(:resource_record_set_count) { should eq 20 }
  it { should have_record_set('notexist.example.local.').a('XXX.XXX.XXX.XXX').ttl(300) }
end

outputs:

route53_hosted_zone 'example.local.'
  should have record set "notexist.example.local."
  resource_record_set_count
    should eq 20

Finished in 1.23 seconds (files took 2.65 seconds to load)
2 examples, 0 failures

If notexist.example.local does not exist, the test is expected to fail, but the test passed.
I'm using version 1.18.1.