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

refactor: improved error handling, snapshot tests for dispenser command #311

Merged
merged 9 commits into from
Sep 19, 2023

Conversation

aorumbayev
Copy link
Collaborator

@aorumbayev aorumbayev commented Sep 11, 2023

Proposed Changes

  • Snapshot tests covering limit, login, logout, fund and refund commands
  • Support custom error handling on latest api

@github-actions
Copy link

github-actions bot commented Sep 11, 2023

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/algokit
   __init__.py15753%6–13, 17–24, 32–34
   __main__.py220%1–3
src/algokit/cli
   completions.py105298%80, 95
   deploy.py56591%34–36, 78, 96
   dispenser.py116199%74
   doctor.py48394%142–144
   generate.py57198%116
   goal.py39197%57
   init.py1901692%268–269, 319, 322–324, 335, 379, 405, 445, 454–456, 459–464, 477
   localnet.py93397%162, 183–184
src/algokit/core
   bootstrap.py1612485%103–104, 126, 149, 214, 217, 223–237, 246–251
   conf.py54885%10, 24, 28, 36, 38, 71–73
   deploy.py691184%61–64, 73–75, 79, 84, 91–93
   dispenser.py2022687%88, 120–121, 138–146, 188–189, 195–197, 215–216, 256–257, 315, 329–331, 342–343, 353, 366, 381
   doctor.py65789%67–69, 92–94, 134
   generate.py41295%68, 86
   goal.py56395%27–28, 38
   log_handlers.py68790%50–51, 63, 112–116, 125
   proc.py45198%98
   sandbox.py1811592%100–107, 118, 278, 294, 309–311, 327
   typed_client_generation.py80594%55–57, 70, 75
   utils.py18289%27–28
   version_prompt.py73889%27–28, 40, 59–62, 80, 109
TOTAL199016092% 

Tests Skipped Failures Errors Time
285 0 💤 0 ❌ 0 🔥 25.154s ⏱️

@aorumbayev aorumbayev marked this pull request as ready for review September 11, 2023 16:57
Copy link
Contributor

@neilcampbell neilcampbell left a comment

Choose a reason for hiding this comment

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

@aorumbayev It appears that we only have approval tests checking token refresh when invoking login. Should we be checking token refresh via fund, refund and limit?

@aorumbayev
Copy link
Collaborator Author

@neilcampbell added explicit batch of unit tests to test the behavior of refreshing the token instead of duplicating it in other methods, plus some minor refinements in the fixtures

@aorumbayev aorumbayev changed the title test: snapshot tests for dispenser command refactor: improved error handling, snapshot tests for dispenser command Sep 14, 2023
@aorumbayev
Copy link
Collaborator Author

@neilcampbell @robdmoore ready for re-review. Latest tests rely on latest custom error responses from dispenser api

@aorumbayev aorumbayev merged commit ea4b002 into auth0 Sep 19, 2023
3 checks passed
@aorumbayev aorumbayev deleted the auth0-snapshot-tests branch September 19, 2023 16:49
aorumbayev added a commit that referenced this pull request Oct 2, 2023
* feat: wip poc for testnet dispenser interface

* refactor: second revision for auth

* chore: refining account codebase

* chore: rev 5 wip changes

* chore: tweaking accounts and scopes to account auth0 limitations per api

* refactor: minor refinements for draft

* chore: minor tweaks

* chore: tweaking tests

* chore: minor tweaks

* chore: ignore gitpython pip-audit warnings; no fixes available yet

* refactor: improving codebase and structure of dispense command

* refactor: refining keyring to fit max limit for windows cred manager

* docs: updating docs

* refactor: improving network handling with custom group class

* docs: adding initial docs on algokit dispense command (#310)

* docs: adding initial docs on algokit dispense command

* chore: addressing pr comments

* refactor: addressing PR comments

* docs: updating docs

* refactor: addressing pr comments

* Update src/algokit/cli/dispenser.py

Co-authored-by: Neil Campbell <neil@codecise.com>

* chore: apply suggestions from code review

Co-authored-by: Neil Campbell <neil@codecise.com>

* refactor: minor enhancements

* chore: minor tweak in warning

* docs: pushing docs

* chore: updating login info statement

* docs: fixing sphinx smart quotes

* chore: addressing pr comments

* docs: refining terminology in docs

* refactor: improved error handling, snapshot tests for dispenser command (#311)

* test: initial snapshot tests

* test: adding snapshot tests

* refactor:  adding explicit tests for refreshing of the token

* chore: recreating approved tests part 1

* chore: recreating approved tests part 2

* chore: partially addressing pr comments

* chore: addressing remaining pr comments

* chore: updating audience

* chore: addressing pr comments

* chore: replacing staging with prod

* chore: pip audit

* chore: updating docs with API docs

---------

Co-authored-by: Neil Campbell <neil@codecise.com>
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.

3 participants