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

Split the endpoint test to multiple files #126

Open
bfabio opened this issue Aug 30, 2022 · 2 comments
Open

Split the endpoint test to multiple files #126

bfabio opened this issue Aug 30, 2022 · 2 comments
Labels
Hacktoberfest Hacktoberfest Label nice-to-have Nice to have feature or improvement

Comments

@bfabio
Copy link
Member

bfabio commented Aug 30, 2022

main_test.go is getting bigger and confusing to navigate.

A single test file for each resource would be nice to have, if that's something we can do without complicating the structure.

@bfabio bfabio added the nice-to-have Nice to have feature or improvement label Aug 30, 2022
@bfabio bfabio added the Hacktoberfest Hacktoberfest Label label Sep 29, 2022
@ludovicobesana
Copy link

@bfabio Hello, if you need some help here i can help you with the one

@bfabio
Copy link
Member Author

bfabio commented Oct 10, 2022

@ludovicobesana hey 👋, it'd be great if you want to take on this bug!

The problem here is that main_test.go is really big (and it'll hopefully grow in the future).

It has tests for all the resources (fe. TestPublishersEndpoints for publishers enpoints, TestLogsEndpoints for logs endpoints and so on) but having all of them in a single file gets us to a 3k lines file which is also getting difficult to navigate.

In addition, all the resources should have more or less the same tests (fe. GET, POST, PATCH, DELETE and combinations for required fields, common errors, etc.) and having those in separate files would make it easy to see if a resource is missing tests that we do on another resource.

@bfabio bfabio changed the title Spit the endpoint test to multiple files Split the endpoint test to multiple files Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest Label nice-to-have Nice to have feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants