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

test: Add unit test coverage for account related functions; Add function and test coverage for reset oauth client secret endpoint #636

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

ykim-akamai
Copy link
Contributor

📝 Description

This PR adds missing unit test coverage for account related methods/functions

There was a missing API endpoint which was available hence decided to add it with this PR along with the proper test coverage

Missing endpoint - https://techdocs.akamai.com/linode-api/reference/post-reset-client-secret

✔️ How to Test

make testint
make testunit
make fixtures ARGS="-run TestOAuthClients_Reset"

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@ykim-akamai ykim-akamai added the testing for updates to the testing suite in the changelog. label Dec 3, 2024
@ykim-akamai ykim-akamai requested a review from a team as a code owner December 3, 2024 01:45
@ykim-akamai ykim-akamai requested review from zliang-akamai and yec-akamai and removed request for a team December 3, 2024 01:45
@@ -129,3 +129,14 @@ func (c *Client) DeleteOAuthClient(ctx context.Context, clientID string) error {
err := doDELETERequest(ctx, c, e)
return err
}

// ResetOAuthClientSecret resets the OAuth Client secret for a client with a specified id
func (c *Client) ResetOAuthClientSecret(ctx context.Context, clientID string) (*OAuthClient, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Nice improvement on test coverage. New tests passed locally!

Copy link
Member

@zliang-akamai zliang-akamai left a comment

Choose a reason for hiding this comment

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

LGTM!

@ykim-akamai ykim-akamai merged commit 6b41317 into linode:main Dec 9, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing for updates to the testing suite in the changelog.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants