-
Notifications
You must be signed in to change notification settings - Fork 152
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 issue 249 #286
Fix issue 249 #286
Conversation
Pull Request Test Coverage Report for Build 1024
💛 - Coveralls |
CHANGELOG.md
Outdated
@@ -1,5 +1,8 @@ | |||
# CHANGELOG | |||
|
|||
## 1.2.5 (2020-05-25) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2020-06 :)
Btw, better not to change any CHANGELOG on a PR, since multiple PRs can happen simultaneously.
@@ -40,6 +40,7 @@ def it_must_contain_something(_step_obj, something, inherited_values=Null): | |||
|
|||
if isinstance(found_key, dict): | |||
found_value = jsonify(found_key.get(something, found_key)) | |||
found_value = found_value if found_value != [] and found_value != '' else found_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets change this conditions to ;
found value = found_value if found_value not in ([], '') else found_key
@@ -137,6 +138,7 @@ def it_must_not_contain_something(_step_obj, something, inherited_values=Null): | |||
|
|||
if isinstance(found_key, dict): | |||
found_value = jsonify(found_key.get(something, found_key)) | |||
found_value = found_value if found_value != [] and found_value != '' else found_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same like above ^^
Scenario: Ensure that waf_policy for ALB/CF tag is defined | ||
Given I have aws_alb defined | ||
When it has tags | ||
Then it must contain waf_policy | ||
And its value must match the "^(internal|external|custom)$" regex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When it has tags
will not drill down to the resource. waf_policy
exists in tags
parameter, thus the test must be changed like ;
Scenario: Ensure that waf_policy for ALB/CF tag is defined
Given I have aws_alb defined
When it has tags
Then it must contain tags
And it must contain waf_policy
And its value must match the "^(internal|external|custom)$" regex
Scenario: Ensure that waf_custom for ALB/CF tag is defined | ||
Given I have aws_alb defined | ||
When it has tags | ||
Then it must contain waf_custom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same like above ^^
On then/it_must_contain_something.py, if the value on "{something: value}" was an empty string/list, the step would evaluate the "something" key to be not existing inside the values.