Open NBJS opened 7 years ago
Hi @NBJS . Thank you for your comment!
awspec is testing framework (on Rspec ). So, I think that we should make strict comparisons.
If you want to solve it now, you can use resource
(see https://github.com/k1LoW/awspec/blob/master/doc/resource_types.md#unlock-advanced-use-10 )
describe s3_bucket('my-bucket') do
its('policy.policy.read') { should match /AccessLogs/ }
end
Regards
Currently the have_policy test will only pass if you specify the randomly generated ids for Policy Id, Statement Id and IAM user Id in the spec. This means you first have to obtain these ids (which I'm currently getting via the sdk). I understand the def in /lib/awspec/type/s3_bucket.rb is just comparing json, but for future, it would be nice to exclude these ids from the comparison.