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

Implement some 'integration' tests #8

Closed
2 of 4 tasks
alexpovel opened this issue Jul 19, 2022 · 3 comments
Closed
2 of 4 tasks

Implement some 'integration' tests #8

alexpovel opened this issue Jul 19, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@alexpovel
Copy link
Owner

alexpovel commented Jul 19, 2022

  • Create one reference, fully featured JSON resume
  • Create derived resumes with all possible fields (all combinations thereof?) set to None where legal (given the schema)
  • Compare all these to expected files (the files contain the ANSI escape characters literally)
  • Load tests?
@alexpovel alexpovel added the enhancement New feature or request label Jul 19, 2022
@alexpovel alexpovel added this to the Initial release milestone Jul 19, 2022
@alexpovel alexpovel self-assigned this Jul 19, 2022
alexpovel added a commit that referenced this issue Jul 26, 2022
@alexpovel
Copy link
Owner Author

By now, we have integration tests (if they can be called that?) for both the CLI (which by extension tests a lot of underlying stuff) and both the API as well as single-file servers (through d645f80), which test the entire stack as well. Together, and with #7, c. 95% coverage is achieved. Some edge cases remain, like these two exceptions:

ancv/ancv/web/client.py

Lines 77 to 82 in 4d5a7ef

except json.decoder.JSONDecodeError:
raise ResumeLookupError("Got malformed JSON.")
except ValidationError:
raise ResumeLookupError(
"Got legal JSON but wrong schema (cf. https://jsonresume.org/schema/)"
)

These are hard to test without mocking the GitHub API or somehow providing actual gists of actual users that would trigger these code paths.

@alexpovel
Copy link
Owner Author

The above is now covered by 476bf58.

@alexpovel
Copy link
Owner Author

Not doing load testing for now. Automatic scaling takes care of that for us now. Plus, a single instance of the app is probably able to handle tons of requests, since it's async-first and templating/rendering is cheap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant