Skip to content

test(statusserver): add unit tests for token parsing and status URL helpers #3404

@suchirkolli

Description

@suchirkolli

What you would like to be added?

I’d like to add focused unit tests for helper functions in pkg/statusserver, specifically:

  • extractRawToken
  • TokenAudience
  • StatusUrl

I also noticed that extractRawToken currently uses exact string splitting on "Bearer <token>", which is a bit brittle for extra whitespace or lowercase bearer. If maintainers agree, I’d like to make that parsing slightly more robust while keeping the behavior simple.

Why is this needed?

These helpers are small but important for status server auth and request path generation. Adding direct unit tests would improve confidence in the status server code and make this logic easier to maintain.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions