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
feat(azure): New check storage_ensure_soft_delete_is_enabled
#3334
Conversation
storage_ensure_soft_delete_is_enabled
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3334 +/- ##
==========================================
- Coverage 85.91% 85.87% -0.04%
==========================================
Files 568 571 +3
Lines 18345 18441 +96
==========================================
+ Hits 15761 15837 +76
- Misses 2584 2604 +20 ☔ View full report in Codecov by Sentry. |
report.resource_name = storage_account.name | ||
report.resource_id = storage_account.id | ||
if ( | ||
storage_account.blob_properties.container_delete_retention_policy.enabled |
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.
What happens if storage_account.blob_properties
is None?
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.
True! I modify it to handle correctly.
Thanks for the review
@@ -42,11 +53,42 @@ def __get_storage_accounts__(self): | |||
) | |||
return storage_accounts | |||
|
|||
def __get_blob_properties__(self): |
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.
Can you add the test of this function in storage_service_test.py
, pleae?
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.
Done!
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.
Please, review my comments.
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.
Great job!!
Context
This pr contains a the new Azure check
storage_ensure_soft_delete_is_enabled
Description
This check makes this task:
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.