Skip to content

[CWS-4488] use cassettes for problematic tests #664

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-14 15:44:18.586011",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-16 13:56:31.640964",
"spec_repo_commit": "dac51bc6"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-05-14 15:44:18.601730",
"spec_repo_commit": "64f5e7ee"
"regenerated": "2025-05-16 13:56:31.658086",
"spec_repo_commit": "dac51bc6"
}
}
}
14 changes: 7 additions & 7 deletions tests/scenarios/features/v2/csm_threats.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Feature: CSM Threats
And a valid "appKeyAuth" key in the system
And an instance of "CSMThreats" API

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Create a CSM Threats Agent policy returns "Bad Request" response
Given new "CreateCSMThreatsAgentPolicy" request
And body with value {"data": {"attributes": {"description": "My agent policy", "enabled": true, "hostTags": [], "hostTagsLists": [], "name": "test"}, "type": "policy"}}
Expand All @@ -25,7 +25,7 @@ Feature: CSM Threats
When the request is sent
Then the response status is 409 Conflict

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Create a CSM Threats Agent policy returns "OK" response
Given new "CreateCSMThreatsAgentPolicy" request
And body with value {"data": {"attributes": {"description": "My agent policy", "enabled": true, "hostTagsLists": [["env:test"]], "name": "my_agent_policy"}, "type": "policy"}}
Expand Down Expand Up @@ -80,14 +80,14 @@ Feature: CSM Threats
When the request is sent
Then the response status is 200 OK

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Delete a CSM Threats Agent policy returns "Not Found" response
Given new "DeleteCSMThreatsAgentPolicy" request
And request contains "policy_id" parameter with value "non-existent-policy-id"
When the request is sent
Then the response status is 404 Not Found

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Delete a CSM Threats Agent policy returns "OK" response
Given there is a valid "policy_rc" in the system
And new "DeleteCSMThreatsAgentPolicy" request
Expand Down Expand Up @@ -204,7 +204,7 @@ Feature: CSM Threats
When the request is sent
Then the response status is 200 OK

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Update a CSM Threats Agent policy returns "Bad Request" response
Given there is a valid "policy_rc" in the system
And new "UpdateCSMThreatsAgentPolicy" request
Expand All @@ -222,15 +222,15 @@ Feature: CSM Threats
When the request is sent
Then the response status is 409 Concurrent Modification

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Update a CSM Threats Agent policy returns "Not Found" response
Given new "UpdateCSMThreatsAgentPolicy" request
And request contains "policy_id" parameter with value "non-existent-policy-id"
And body with value {"data": {"attributes": {"description": "My agent policy", "enabled": true, "hostTags": [], "name": "my_agent_policy"}, "id": "non-existent-policy-id", "type": "policy"}}
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
@replay-only @team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
Scenario: Update a CSM Threats Agent policy returns "OK" response
Given there is a valid "policy_rc" in the system
And new "UpdateCSMThreatsAgentPolicy" request
Expand Down