Skip to content

Commit

Permalink
make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-Huneshagen committed Nov 13, 2023
1 parent 58598de commit 6090f3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions cfripper/rules/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
SQSQueuePolicyNotPrincipalRule,
SQSQueuePolicyPublicRule,
)

from cfripper.rules.stack_name_matches_regex import StackNameMatchesRegexRule
from cfripper.rules.storage_encrypted_rule import StorageEncryptedRule

from cfripper.rules.wildcard_policies import (
GenericResourceWildcardPolicyRule,
S3BucketPolicyWildcardActionRule,
Expand Down
6 changes: 3 additions & 3 deletions tests/rules/test_StackNameMatchesRegexRule.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ def test_failure_is_added_for_invalid_stack_name_from_extras():
"characters and hyphens allowed."
)


def failure_is_added_for_invalid_stack_name_from_extras():
rule = StackNameMatchesRegexRule(Config(rules=["StackNameMatchesRegexRule"]))
extras = {"stack": {"tags": [{"key": "project", "value": "some_project"}]}, "stack_name": "some_invalid_stack_name"}
result = rule.invoke(cfmodel=CFModel(), extras=extras)
assert result.failures
assert (
result.failures[0].reason
== "The stack name some_invalid_stack_name does not follow the naming convention (only alphanumerical characters and hyphens allowed)."
result.failures[0].reason
== "The stack name some_invalid_stack_name does not follow the naming convention (only alphanumerical characters and hyphens allowed)."
)

0 comments on commit 6090f3e

Please sign in to comment.