Skip to content

Test Twitter OAuth implementation #1975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

olirice
Copy link
Contributor

@olirice olirice commented Mar 31, 2025

TBD if these will be valuable. Its LLM generated. For discussion at weekly sync

Summary

This PR analyzes the Twitter OAuth provider implementation test coverage, finding that only 10.2% of statements and 75% of functions are covered. The coverage gap specifically affects the OAuth 1.0a authentication flow.

Key Findings

Covered: NewTwitterProvider, GetOAuthToken, GetUserData, newConsumer, Marshal, and Unmarshal
Uncovered Functions: FetchUserData and AuthCodeURL

Unit Tests (internal/api/provider/twitter_test.go)

Tests the provider's construction and utility methods

Integration Tests (internal/api/external_twitter_test.go)

Tests the complete authentication flow, but some skipped due to mocking complexity

@olirice olirice requested a review from a team as a code owner March 31, 2025 22:09
@olirice olirice marked this pull request as draft March 31, 2025 22:16
@coveralls
Copy link

Pull Request Test Coverage Report for Build 14182602780

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 67.58%

Files with Coverage Reduction New Missed Lines %
internal/api/provider/twitter.go 7 43.48%
Totals Coverage Status
Change from base Build 14133011190: 0.07%
Covered Lines: 10233
Relevant Lines: 15142

💛 - Coveralls

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.

2 participants