ernestio / ernest

Ernest is a tool to define, manage and collaborate on your infrastructure
http://ernest.io/
Mozilla Public License 2.0
17 stars 6 forks source link

AWS RDS_Cluster policy problems #885

Closed reidjc closed 6 years ago

reidjc commented 6 years ago

Three problems:

(1) it {should be_public} fails when the policy and yaml match (2) its('database_name') {should be ['test']} fails when the policy and yaml match (3) its('availability_zones') {should_not be ['eu-west-1a', 'eu-west-1b']} passes when the policy and yaml do not match

g3kk0 commented 6 years ago

1) This attribute doesn't appear to be available (will update docs to reflect this). 2) Syntax error in example. Should be its('database_name') {should be 'test'} 3) The be matcher expects a complete match not a partial one

e.g.

# manifest.yml

availability_zones:
  - eu-west-1a
  - eu-west-1b

Result: match

availability_zones:
  - eu-west-1a
  - eu-west-1b
  - eu-west-1c

Result: no match

If the aim is to test each element within the list for a match then we could add support for another matcher like include.

reidjc commented 6 years ago

OK. (3) is fine as is.