Skip to content

Conversation

@Benjosh95
Copy link
Contributor

@Benjosh95 Benjosh95 commented Jun 18, 2025

Description

Problem:
The Key Flow unit tests were manually creating KeyFlow structs and setting fields directly instead of using the proper Init() function. This caused some further problems with the testing structure.

Solution:
Updated the tests to use the Init() function with proper KeyFlowConfig containing all required fields, and fixed timing issues in the continuous refresh tests by aligning token lifetimes, refresh intervals, and context durations to ensure predictable test behavior.

Jira-Ticket: https://jira.schwarz/browse/STACKITSDK-159

Checklist

  • Issue was linked above
  • No generated code was adjusted manually (check comments in file header)
  • Changelogs
    • Changelog in the root directory was adjusted (see here)
    • Changelog(s) of the service(s) were adjusted (see e.g. here)
  • Code format was applied: make fmt
  • Examples were added / adjusted (see examples/ directory)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

@Benjosh95 Benjosh95 changed the title correct use of keyflow.init() and refactoring feat(sdk): Refactoring using keyflow.init() Jun 24, 2025
@Benjosh95 Benjosh95 force-pushed the feat/keyflow-unittest-impr branch from 17e6791 to 1824510 Compare June 30, 2025 07:42
@Benjosh95 Benjosh95 marked this pull request as ready for review June 30, 2025 09:05
@Benjosh95 Benjosh95 force-pushed the feat/keyflow-unittest-impr branch from afe8f31 to 539b605 Compare July 1, 2025 12:48
@Benjosh95
Copy link
Contributor Author

@Fyusel, could you please take a final look at the latest changes? If you approve them, I’ll go ahead and merge the pull request. :)

@Benjosh95 Benjosh95 merged commit 84d2efa into main Jul 1, 2025
8 checks passed
@Benjosh95 Benjosh95 deleted the feat/keyflow-unittest-impr branch July 1, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants