Skip to content
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

[BACK-2989] Add Twiist provider #724

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

[BACK-2989] Add Twiist provider #724

wants to merge 3 commits into from

Conversation

toddkazakov
Copy link
Contributor

No description provided.

@toddkazakov toddkazakov changed the title Add Twiist provider [BACK-2989] Add Twiist provider Jun 12, 2024
@toddkazakov toddkazakov requested a review from ewollesen June 13, 2024 09:14
Copy link
Contributor

@ewollesen ewollesen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is that there are 0 tests.

@@ -51,6 +51,11 @@ func NewProvider(name string, configReporter config.Reporter) (*Provider, error)
}
cfg.Scopes = SplitScopes(configReporter.GetWithDefault("scopes", ""))

authStyleInParams := configReporter.GetWithDefault("auth_style_in_params", "")
if authStyleInParams == "true" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strconv.ParseBool might have been a good fit here.

AccessToken: t.AccessToken,
TokenType: t.TokenType,
RefreshToken: t.RefreshToken,
Expiry: t.ExpirationTime,
}
if t.IdToken != "" {
token.WithExtra(map[string]any{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. TIL.

@toddkazakov
Copy link
Contributor Author

@ewollesen unfortunately, the newly added code is rather difficult to test in isolation - it requires a whole lot of mocking in order to test that a task is created on linking and the task is deleted when accounts are unlinked. Same holds true for the pre-existing Dexcom code which also lacks such tests. Given that there isn't much going on here, I think it's ok this to be tested manually by the QA team.

Copy link
Contributor

@ewollesen ewollesen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can trust that you're making the right tradeoffs.

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