-
Notifications
You must be signed in to change notification settings - Fork 2
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
Johnha/feature/create unavailability testing #174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future we should be writing our repositories etc such that we can do proper unit testing, but this is a good effort considering the code you were given!
Address the minor feedback, and remove the underscores from your branch name, just use dashes "-".
Hi @BenMMcLean , can you have a look at my comment and my changes :-) thank youu |
Please address the issues with the smoke test, and then this can be merged. (The smoke test just runs your code in a docker container. You can pull it locally using the tag |
I tried to pull request pr-174 in Git but I think you meant something else cause I didn't find anything after pulling. It would be very helpful if you can show me some resources related to this cause I have no previous knowledge about this Github ci/cd. However, I still managed to fix the error :-) It happened because I refactored |
Some new changes:
|
There aren't any resources AFAIK, but all you have to do to run the docker image of your code is modify the docker-compose.frontend.yml file, changing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Setting up a testing environment for the project using pytest. Creating testing folders for functional and unit testing. Needed to be further refined to have development, testing, and production configuration. Currently, testing will create and get directly from the database which is not a good practice. Creating some test cases for creating unavailability endpoint with testing criteria: - two consecutive create operations must output two consecutive event_id - Cannot create two unavailability with the same time interval - Cannot create availability for nonexistent user_id - Cannot create unavailability with an end time earlier than the start time - Cannot create unavailability with weird periodicity (to be discussed) - There cannot be two unavailability from the same user with overlapped time interval - Merge interval (if implemented on API) Some significant changes: - Creating a tests folder that will contain all future functional and unit tests for the project - Refactoring application.py class to make use of factory method design pattern so that many instances of the application can be created, for now, it can be used in testing <img width="467" alt="image" src="https://github.com/TechlauncherFireApp/backend/assets/97883232/f9ee0b5a-ad7a-469c-8d4e-fbea15e3f0f9"> https://fireapp-emergiq-2024.atlassian.net/jira/software/projects/FE/boards/1?selectedIssue=FE-68
Describe your changes
Setting up a testing environment for the project using pytest. Creating testing folders for functional and unit testing. Needed to be further refined to have development, testing, and production configuration. Currently, testing will create and get directly from the database which is not a good practice. Creating some test cases for creating unavailability endpoint with testing criteria:
Some significant changes:
Issue ticket number and link
https://fireapp-emergiq-2024.atlassian.net/jira/software/projects/FE/boards/1?selectedIssue=FE-68