-
Notifications
You must be signed in to change notification settings - Fork 206
chore: Enable OAuth token test #3777
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
chore: Enable OAuth token test #3777
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables OAuth token testing by adding infrastructure to generate OAuth2 access tokens and running the previously skipped TestAccAccessToken_basic
test in CI. The change removes the CI skip condition and adds the necessary tooling to generate valid access tokens during test execution.
- Removes CI skip for OAuth token test that was previously disabled due to token validity constraints
- Adds OAuth2 token generation tool for creating access tokens from service account credentials
- Integrates token generation into the CI workflow to enable automated OAuth testing
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
tools/generate-oauth2-token/main.go | New utility to generate OAuth2 access tokens from service account credentials |
internal/provider/provider_authentication_test.go | Removes CI skip condition for OAuth token test |
Makefile | Adds target for OAuth2 token generation |
.github/workflows/acceptance-tests-runner.yml | Integrates token generation and OAuth test execution in CI workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
exit 1 | ||
fi | ||
{ | ||
echo "access_token<<EOF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting way of creating multiline variable. I guess access token spans multiple lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not because multi-line but because characters that need to be escaped so heredoc is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just making sure we're not accidentally exposing tokens/secrets
exit 1 | ||
fi | ||
{ | ||
echo "access_token<<EOF" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just double checking: no token will be output in the console, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can check last run logs: link - all good 👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct, it'll show the typical ***
Description
Enable OAuth token test
Link to any related issue(s): CLOUDP-347669
Type of change:
Required Checklist:
Further comments