-
Notifications
You must be signed in to change notification settings - Fork 20
Add CSM Coverage Analysis API specs #2164
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 2024-12-19T17:17:10.296Z |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 2024-12-19T17:17:10.704Z |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 2024-12-19T17:17:11.235Z |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # Get the CSM Cloud Accounts Coverage Analysis returns "OK" response | ||
|
|
||
| require "datadog_api_client" | ||
| api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new | ||
| p api_instance.get_csm_cloud_accounts_coverage_analysis() | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| # Get the CSM Hosts and Containers Coverage Analysis returns "OK" response | ||||||
|
|
||||||
| require "datadog_api_client" | ||||||
| api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new | ||||||
| p api_instance.get_csm_hosts_and_containers_coverage_analysis() | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Code Quality Violation
Suggested change
Do not use parentheses with methods that take no arguments (...read more)The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand. This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success. To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing |
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||
| # Get the CSM Serverless Coverage Analysis returns "OK" response | ||||||
|
|
||||||
| require "datadog_api_client" | ||||||
| api_instance = DatadogAPIClient::V2::CSMCoverageAnalysisAPI.new | ||||||
| p api_instance.get_csm_serverless_coverage_analysis() | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ Code Quality Violation
Suggested change
Do not use parentheses with methods that take no arguments (...read more)The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand. This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success. To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing |
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| @endpoint(csm-coverage-analysis) @endpoint(csm-coverage-analysis-v2) | ||
| Feature: CSM Coverage Analysis | ||
| Datadog Cloud Security Management (CSM) delivers real-time threat | ||
| detection and continuous configuration audits across your entire cloud | ||
| infrastructure, all in a unified view for seamless collaboration and | ||
| faster remediation. Go to | ||
| https://docs.datadoghq.com/security/cloud_security_management to learn | ||
| more. | ||
|
|
||
| Background: | ||
| Given a valid "apiKeyAuth" key in the system | ||
| And a valid "appKeyAuth" key in the system | ||
| And an instance of "CSMCoverageAnalysis" API | ||
|
|
||
| @team:DataDog/k9-cloud-security-platform | ||
| Scenario: Get the CSM Cloud Accounts Coverage Analysis returns "OK" response | ||
| Given new "GetCSMCloudAccountsCoverageAnalysis" request | ||
| When the request is sent | ||
| Then the response status is 200 OK | ||
|
|
||
| @team:DataDog/k9-cloud-security-platform | ||
| Scenario: Get the CSM Hosts and Containers Coverage Analysis returns "OK" response | ||
| Given new "GetCSMHostsAndContainersCoverageAnalysis" request | ||
| When the request is sent | ||
| Then the response status is 200 OK | ||
|
|
||
| @team:DataDog/k9-cloud-security-platform | ||
| Scenario: Get the CSM Serverless Coverage Analysis returns "OK" response | ||
| Given new "GetCSMServerlessCoverageAnalysis" request | ||
| When the request is sent | ||
| Then the response status is 200 OK |
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.
⚪ Code Quality Violation
Do not use parentheses with methods that take no arguments (...read more)
The rule "Avoid parentheses when methods take no arguments" is part of the Ruby style guide. It suggests that when a method takes no arguments, you should not use parentheses. This is because the use of parentheses in such a case is redundant and unnecessary, and it can make your code more difficult to read and understand.
This rule is important because it promotes cleaner, more readable code. In Ruby, clean and readable code is highly valued. By following this rule, you can ensure your code is easier to understand and maintain, which is crucial for long-term project success.
To adhere to this rule, remove the parentheses when calling a method that does not require any arguments. For example, instead of writing
'test'.upcase(), you should write'test'.upcase. Similarly, instead ofKernel.exit!(), writeKernel.exit!. However, note that there is an exception forsuper-superby itself is different fromsuper(), so in this case, parentheses may be necessary.