k1LoW / awspec

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

route53_hosted_zone parameter check fails with 'no implicit conversion of Hash into String' #528

Closed GenPage closed 3 years ago

GenPage commented 3 years ago
Failures:

  1) route53_hosted_zone '{"hosted_zone_id"=>{"sensitive"=>false, "type"=>"string", "value"=>"Z0669503BZ8PBGTDZVPL"}, "hosted_zone_name"=>{"sensitive"=>false, "type"=>"string", "value"=>"plantest.infra.dev"}, "nameservers"=>{"sensitive"=>false, "type"=>["tuple", [["tuple", ["string", "string", "string", "string"]]]], "value"=>[["ns-12.awsdns
-01.com", "ns-1259.awsdns-29.org", "ns-1905.awsdns-46.co.uk", "ns-679.awsdns-20.net"]]}}' is expected to have record set "test.plantest.infra.dev."
     Failure/Error: it { should have_record_set('test.plantest.infra.dev.').type('cname').ttl(60) }

     TypeError:
       no implicit conversion of Hash into String
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:9:in `+'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:9:in `block (2 levels) in find_hosted_zone'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:8:in `each'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:8:in `block in find_hosted_zone'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:7:in `loop'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/helper/finder/route53.rb:7:in `find_hosted_zone'                                                                                                                                                                                                                                                  # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/type/route53_hosted_zone.rb:4:in `resource_via_client'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/type/route53_hosted_zone.rb:8:in `id'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/type/route53_hosted_zone.rb:12:in `resource_via_client_record_sets'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/type/route53_hosted_zone.rb:18:in `has_record_set?'
     # /home/plangrid/.gems/gems/awspec-1.22.1/lib/awspec/matcher/have_record_set.rb:3:in `block (2 levels) in <top (required)>'
     # ./spec/dns_spec.rb:12:in `block (2 levels) in <top (required)>'
GenPage commented 3 years ago

Please close, I was passing an object instead of the hosted_zone name