Skip to content

Conversation

@codecov-ai
Copy link

@codecov-ai codecov-ai bot commented May 22, 2025

This PR adds tests for #179

Commits:

  • Add unit tests for CurrentTokenInfo artificial expiry date logic

This commit adds tests for the recent change that sets an artificial expiry date
for tokens that don't have one set. The tests verify that:

  1. Tokens with existing expiry dates are left unchanged
  2. Tokens without expiry dates get one set to 1 year after creation minus 2 days

Addresses issue #178.

  • Add unit tests for newGitlabClient validation logic

This commit adds tests for the input validation in the newGitlabClient function,
particularly focusing on:

  1. Empty base URL validation
  2. Whitespace-only base URL validation
  3. Empty token validation
  4. Whitespace-only token validation

The tests verify that the newly refactored string comparisons
(strings.TrimSpace(x) == "" vs "" == strings.TrimSpace(x))
correctly identify invalid input values.

@ilijamt ilijamt closed this Jun 2, 2025
@ilijamt ilijamt deleted the ai-tests-for-pr179-1747948697 branch June 6, 2025 13:54
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.

1 participant