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: removes e2e tests in favor of the sdk-test suite #131

Merged
merged 5 commits into from
Jan 28, 2025

Conversation

ctran88
Copy link
Contributor

@ctran88 ctran88 commented Jan 27, 2025

What's New?

  • removes e2e tests
  • removes secrets from env vars in CI
  • removes unused deps
  • changes concurrency test for jwks caching to use passage app

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have manually tested my code thoroughly
  • I have added/updated inline documentation for public facing interfaces if relevant
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing integration and unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional context

assert.Equal(t, "errorCode: invalid_request", splitError[1])
assert.Equal(t, "statusCode: 400", splitError[2])
}

// should be run with the -race flag, i.e. `go test -race -run TestAppJWKSCacheWriteConcurrency`
func TestAppJWKSCacheWriteConcurrency(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

thought it would be better to leave this test in this repo since the issue was raised here and it's easier to understand the regression at this level

@@ -88,7 +19,7 @@ func TestAppJWKSCacheWriteConcurrency(t *testing.T) {
go func() {
defer wg.Done()

_, err := passage.New(PassageAppID, PassageApiKey)
_, err := passage.New("passage", "some-api-key")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

figured this is the safest and easiest way to keep this test functional

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this test require the app ID to be valid? If not, maybe having "some-app-id" as the placeholder could make that extra clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the app ID must be valid so it can reach out and cache the JWKS

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 makes sense.

Is this initialization behavior unique to this SDK?

It might be helpful to add a comment here noting that a real network request will be made with the app ID to cache the JWKs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, all SDKs try to get the JWKs immediately upon initialization. added a comment in 387b088

@ctran88 ctran88 marked this pull request as ready for review January 27, 2025 23:10
Copy link
Contributor

@bertrmz bertrmz left a comment

Choose a reason for hiding this comment

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

Left a suggestion but overall LGTM.

@ctran88 ctran88 merged commit 5755802 into main Jan 28, 2025
6 of 7 checks passed
@ctran88 ctran88 deleted the PSG-5823-remove-e2e-tests branch January 28, 2025 21:50
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