stop-analyzing-api has (currently) two possible migration scenarios: URL and Json file import.
We believe that it would be good to have an integration test using golden files to check :
- Scenario with valid json
- Scenario with invalid json
2.1) Format
2.2) Content
2.3) Enconding
Here is an article with details of how to create golden-files: https://ieftimov.com/post/testing-in-go-golden-files/
Here's the simplest example of a golden file test: https://github.com/zamariola/time-tracker-golang/blob/master/filesystem/filesystemsaver_integration_test.go
stop-analyzing-api has (currently) two possible migration scenarios: URL and Json file import.
We believe that it would be good to have an integration test using golden files to check :
2.1) Format
2.2) Content
2.3) Enconding
Here is an article with details of how to create golden-files: https://ieftimov.com/post/testing-in-go-golden-files/
Here's the simplest example of a golden file test: https://github.com/zamariola/time-tracker-golang/blob/master/filesystem/filesystemsaver_integration_test.go