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 conversion follow-up #322

Open
2 of 12 tasks
jaswilli opened this issue Oct 26, 2018 · 2 comments
Open
2 of 12 tasks

Test conversion follow-up #322

jaswilli opened this issue Oct 26, 2018 · 2 comments
Labels
maintenance Internal improvements (e.g. tests)

Comments

@jaswilli
Copy link
Contributor

jaswilli commented Oct 26, 2018

Todos in follow up to #315.

Planned tests to add:

  • Check loading GCP ID from file with the local_endpoint module
  • Add unicode to a few response objects, make sure it comes through translations okay
  • Full successful login flow
  • Functional tests for RenewingAuthorizer usage
    • RefreshToken and ClientCredentials
    • Check 401s on first response and second response
    • Check with a client method with retry_401s=False
    • RenewingAuthorizer callout may fail (e.g. network error)
    • Ensure on_refresh callback is invoked
    • Propagate errors from malformed on_refresh callback
      • Does the Authorizer state change? Documenting this behavior would be a good add
@jaswilli jaswilli added maintenance Internal improvements (e.g. tests) tests labels Oct 26, 2018
@sirosen
Copy link
Member

sirosen commented Oct 27, 2018

We should also look at #151 again. Those "untestable" things were one of the drivers of the conversion.

@sirosen
Copy link
Member

sirosen commented Feb 2, 2021

I'm copying from #151 as a checkbox list, and I've closed it to consolidate. Some of these are not relevant anymore, some are.

  • Myproxy activation. Requires a stable endpoint with a myproxy login for SDK Tester. (may be deprecated at some point anyways)
  • Login-flow. Requires automating a browser and SDK Tester's login credentials being made public.
  • Code exchange. Requires login-flow or a non expiring test code.
  • Live openid JWT decoding. Requires login-flow, a non expiring id_token, or an auth resource other than code exchange that responds with an an id_token.
  • Dependent token grants. Requires a resource server client and scopes to be set up.
  • Managed endpoint resources. Requires SDK Tester to have privileges on a managed endpoint, which would give public access to privileges on a managed endpoint.

At a glance, I think we should focus on whatever gives us more code/conditional coverage, and that makes the last two -- managed endpoint tests and dependent token tests -- the most attractive. They're straightforward and "just need doing".
I'm not sure a login flow, JWT handling, code exchange, or activation are particularly useful to test. (Though some tests of the activation response might be wise, if we don't have those.)

@sirosen sirosen removed the tests label Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Internal improvements (e.g. tests)
Projects
None yet
Development

No branches or pull requests

2 participants