Fierro-Labs / Fierro

IPNS API and pinning service
https://www.fierro.io
MIT License
34 stars 4 forks source link

Go test framework #8

Open mrodriguez3313 opened 2 years ago

mrodriguez3313 commented 2 years ago

Create test framework and check endpoints. I think the first best way to do this would be to have the IPFS node running locally and the API server running locally as well. First start with a clean node. Second, make a request in Go to the API, and test return value. I would expect a response of 200 and some content specified in the README.

mrodriguez3313 commented 2 years ago

What I would ideally like is being able to emulate having the API server and IPFS node, on a remote server. Then being able to make calls to the API and return values like normal. But I dont know how github actions would be able to reproduce that setup to be able to get a codecov result?

mrodriguez3313 commented 2 years ago

I have implemented testing in #27. Unfortunately, I have not figured out a way to have a remote ipfs node and server such that I can make test cases to the remote api like in a production environment. GH actions also does not support launching the API and testing it so I must do that locally, upload the coverage.out file and use the GH action to upload that report to codecov.