Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix its key condition be value #300

Merged

Conversation

Kudbettin
Copy link
Member

Addresses #295 and is related to the discussions in #291, #292. (invalidates some responses)

Two rules were kept in mind:

  • Then always drills down: Drilling down to value and not key
  • Then fails if any resources fail, unless specified otherwise

Two questions about the changes:

  1. I am not sure if it would be better to return/drill down to the found values, or a formatted version of them:
{
     address: old_address.key
     type: key(?)
     values: found_values
}
  1. Should unit tests be added here? (e.g. check if number of resources are conserved, check if resources are correctly drilled down to the value)

@coveralls
Copy link

coveralls commented Jun 15, 2020

Pull Request Test Coverage Report for Build 1062

  • 0 of 26 (0.0%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 59.86%

Changes Missing Coverage Covered Lines Changed/Added Lines %
terraform_compliance/steps/then/its_key_condition_be_value.py 0 26 0.0%
Files with Coverage Reduction New Missed Lines %
terraform_compliance/common/defaults.py 6 83.33%
Totals Coverage Status
Change from base Build 1057: 0.06%
Covered Lines: 1193
Relevant Lines: 1993

💛 - Coveralls

@Kudbettin
Copy link
Member Author

Resources after drill down are now correctly not forced to be 1:1. Drilling down a resource can pass more than one resource to the next step.

eerkunt
eerkunt previously approved these changes Jun 17, 2020
@Kudbettin Kudbettin force-pushed the fix-its_key_condition_be_value branch from f531fbc to 854a0c2 Compare June 17, 2020 12:30
@eerkunt eerkunt merged commit 49d663e into terraform-compliance:master Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants