kubeflow/trainer

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

已關閉

#3,404 建立於 2026年3月31日

 (7 則留言) (0 個反應) (1 位負責人)Go (964 個分叉)github user discovery
area/testinggood first issuehelp wantedkind/feature

倉庫指標

星標
 (2,112 顆星)
PR 合併指標
 (平均合併 10天 9小時) (30 天內合併 75 個 PR)

描述

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.

貢獻者指南