Added necessary unit tests to the database package such as TestNew, and formalized our TestMain and helper tests
Usage
I also made sure to include the correct testing configuration "go test matcha" which makes it really clean to run all module tests
Changes
Moved tests into their own package fields to clear up a test logs a ton, also helped solve variable scope issues (i.e. we can now test private methods and attributes!!!)
Reformatted go.yml and other files with issue
Cleaned up PR template
Commented out unnecessary tables for now since we want to keep them well tested and we have not gone through feature design meetings yet.
Lastly, I changed the database field language from created_at to created_on to clarify that it holds a date not just a time
-I cleaned up every use of t.Error vs t.Fatal, please follow this pattern in the future.
Rationale
This method of testing is far more reusable and actualy prevents anyone ushing breaking changes to our init.sql script and mysql.gop database implementation. It also allows us to test private helpers etc.
Dependencies
N/A
Issues and Bugs
No password hashing yet
Signup button still bugged, does not redirect to login page upon good signup
Possible Solutions
N/A
Additional Notes
N/A
Contributors(@):
@CarlosACJ55
Checklist before submitting
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have made corresponding changes to the documentation (if applicable).
[x] My changes generate no new warnings or errors.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] New and existing unit tests pass locally with my changes.
[x] I have checked my code and corrected any misspellings.
[x] I have confirmed that my PR is targeting the correct branch.
[x] I understand that after merging, my branch may be deleted to keep the repository clean.
[x] I have notified the team with the status of my PR.
[x] If merge conflicts occur I will confer with other members of the team on how to proceed.
Purpose
Added necessary unit tests to the database package such as TestNew, and formalized our TestMain and helper tests
Usage
I also made sure to include the correct testing configuration "go test matcha" which makes it really clean to run all module tests
Changes
Rationale
This method of testing is far more reusable and actualy prevents anyone ushing breaking changes to our init.sql script and mysql.gop database implementation. It also allows us to test private helpers etc.
Dependencies
N/A
Issues and Bugs
Possible Solutions
N/A
Additional Notes
N/A
Contributors(@):
@CarlosACJ55
Checklist before submitting