Open amirilovic opened 2 years ago
Yeah, definitely want to have tests in the project. Only I have been struggling to write them so far. I still quite new in the Go language. Yeah, so I am looking to find out how the 'supertest' or 'msw' way in Golang land is.
I am planning to look into it over the holidays
this one looks very close to supertest https://github.com/gavv/httpexpect. But it seems to be just a wrapper around standard httptest package which is already pretty good: https://golang.cafe/blog/golang-httptest-example.html.
Thank you @amirilovic I will check it out :)
Are you so far enjoying the project? Any concerns or experiences you want to share?
How about adding tests to the project?
Usually with project like this I would add integration tests with docker compose where in the tests your are simulating real requests to the server and checking if expected things happened in the database (in this case s3 or gcs).
In nodejs I used https://www.npmjs.com/package/supertest to simulate http requests to the server without the need of actually server listening on a port, which makes it easy to run tests in parallel if needed. Not sure if same exists in golang land.
Of course, very interested to help with writing of the tests.
What do you think?