Skip to content
This repository has been archived by the owner on Dec 11, 2021. It is now read-only.

Migrate reminder endpoints over from site, set up the testing suite #30

Closed
wants to merge 10 commits into from

Conversation

D0rs4n
Copy link
Member

@D0rs4n D0rs4n commented Nov 20, 2021

Closes #22
Closes #31

  • This PR adds substantial pytest fixtures that can be used in the future. (More about that topic)
  • It also introduces changes in the linting-testing workflow:
    • Add a test database to the workflow
  • Migrate reminders endpoint
    • Now, using Async SQLAlchemy and 2.0 syntax.
  • Furthermore, Database enhancements have been implemented.
  • Introduce a new task to run tests inside docker. (See the updated README)

- Add an Init sql script to create a test database that can be used for testing purposes.
- Create a pytest 'conftest' with global fixtures for future testing purposes
- Implement Reminder tests in an async manner.
 - Add an additional fixture to properly access instance attributes in async pytest fixtures
@D0rs4n D0rs4n added area: back-end area: CI Continuous Integration and Continuous Deployment area: endpoint Related to an endpoint/route area: unit tests type: feature A request for or implementation of a new feature labels Nov 20, 2021
Copy link

@onerandomusername onerandomusername left a comment

Choose a reason for hiding this comment

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

Seems okay for what it does.

Would like to see a few sentences in the readme to clarify that the database must exist to run the tests at this point.

OR as discussed on discord, recommend running the tests on docker if support is added. 👍

.github/workflows/lint-test.yml Show resolved Hide resolved
tox.ini Show resolved Hide resolved
- This commit adds a task that runs the tests inside docker
- It also introduces changes to the README regarding the instructions of how to run tests.
- This commit also patches a minor issue regarding how pydantic and FastAPI parses the `expiration` field when issuing a PATCH request.
@jchristgit jchristgit self-assigned this Nov 26, 2021
@jchristgit jchristgit self-requested a review November 26, 2021 19:22
Copy link

@Shom770 Shom770 left a comment

Choose a reason for hiding this comment

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

LGTM! Maybe a few more places that could use more comments/explanation but otherwise it looks good to me

@D0rs4n
Copy link
Member Author

D0rs4n commented Nov 29, 2021

LGTM! Maybe a few more places that could use more comments/explanation but otherwise it looks good to me

Thank you for the review, I've addressed a few changes regarding code consistency, and comments.

@jchristgit
Copy link
Member

Closing this in coordination with Joe per us sunsetting this project.

@jchristgit jchristgit closed this Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: back-end area: CI Continuous Integration and Continuous Deployment area: endpoint Related to an endpoint/route area: unit tests type: feature A request for or implementation of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementing test parallelisation Migrate reminders endpoint from the site API
4 participants