Skip to content
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
2 changes: 1 addition & 1 deletion src/commands/data_deletion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::formatter;
use crate::util;

fn make_api(cfg: &Config) -> DataDeletionAPI {
crate::make_api_no_auth!(DataDeletionAPI, cfg)
crate::make_api!(DataDeletionAPI, cfg)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add coverage for the OAuth bearer path

The existing data-deletion tests build their configuration with access_token: None, so this macro change is exercised only with API keys and never verifies the behavior it is intended to fix. If bearer middleware stops being installed—or the token header is malformed—the original OAuth-only failure will return while these tests remain green; add a bearer-only test that matches Authorization: Bearer <token> and corresponding failure-path coverage.

AGENTS.md reference: AGENTS.md:L22-L22

Useful? React with 👍 / 👎.

}

pub async fn requests_list(
Expand Down
6 changes: 6 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,12 @@ enum Commands {
/// pup data-deletion requests list
/// pup data-deletion requests create --product logs --file request.json
/// pup data-deletion requests cancel <request-id>
///
/// AUTHENTICATION:
/// Requires either OAuth2 authentication or API keys.
/// All operations require the logs_delete_data and/or rum_delete_data
/// scopes, which are not requested by default -- opt in with:
/// pup auth login --extra-scopes logs_delete_data,rum_delete_data
#[command(name = "data-deletion", verbatim_doc_comment)]
DataDeletion {
#[command(subcommand)]
Expand Down