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

General case sensitivity and centralized matching #304

Merged
merged 15 commits into from
Jul 8, 2020

Conversation

Kudbettin
Copy link
Member

@Kudbettin Kudbettin commented Jun 24, 2020

Generalized case-sensitivity tag to work on all steps. Centralized matching and seeking functions.

Left the copies of seek functions so that they may be used in other parts of the source (e.g. extensions/terraform.py)

Please take special care at reviewing the changes at control blocks!

@coveralls
Copy link

coveralls commented Jun 24, 2020

Pull Request Test Coverage Report for Build 1093

  • 121 of 205 (59.02%) changed or added relevant lines in 13 files are covered.
  • 26 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.2%) to 59.685%

Changes Missing Coverage Covered Lines Changed/Added Lines %
terraform_compliance/common/bdd_tags.py 8 9 88.89%
terraform_compliance/steps/then/property_is_enabled.py 5 6 83.33%
terraform_compliance/steps/given/i_have_name_section_configured.py 5 7 71.43%
terraform_compliance/extensions/terraform.py 6 9 66.67%
terraform_compliance/steps/steps.py 0 3 0.0%
terraform_compliance/steps/then/its_value_condition_match_the_search_regex.py 6 10 60.0%
terraform_compliance/steps/then/its_key_condition_be_value.py 0 5 0.0%
terraform_compliance/steps/when/its_key_is_value.py 14 22 63.64%
terraform_compliance/common/helper.py 62 79 78.48%
terraform_compliance/steps/when/it_contains_something.py 6 23 26.09%
Files with Coverage Reduction New Missed Lines %
terraform_compliance/extensions/terraform.py 1 66.38%
terraform_compliance/steps/then/it_must_contain_something.py 1 19.83%
terraform_compliance/steps/when/it_contains_something.py 2 31.44%
terraform_compliance/steps/when/its_key_is_value.py 2 73.33%
terraform_compliance/common/defaults.py 6 84.21%
terraform_compliance/common/helper.py 14 78.6%
Totals Coverage Status
Change from base Build 1089: 0.2%
Covered Lines: 1288
Relevant Lines: 2158

💛 - Coveralls

@Kudbettin Kudbettin marked this pull request as ready for review June 24, 2020 17:41
@Kudbettin
Copy link
Member Author

Addresses #268

@Kudbettin Kudbettin marked this pull request as draft July 3, 2020 21:01
@Kudbettin Kudbettin marked this pull request as ready for review July 6, 2020 12:27
@Kudbettin
Copy link
Member Author

This branch includes some refactoring such as removal of unnecessary Defaults() and jsonify calls.

Behavior of it_must_contain is slightly changed to accommodate lists of (bool, str, int, float)

@eerkunt
Copy link
Member

eerkunt commented Jul 8, 2020

#307

@eerkunt eerkunt merged commit eafc5c7 into terraform-compliance:master Jul 8, 2020
@eerkunt eerkunt mentioned this pull request Jul 8, 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.

None yet

3 participants