equinor / vds-slice

Web API for fast access of arbitrary seismic slices from VDS data
GNU Affero General Public License v3.0
3 stars 8 forks source link

Refactor the go tests in the cmd/query folder #248

Open yngve793 opened 9 months ago

yngve793 commented 9 months ago

Tests in main_test.go has been expanded to cover new cases as features has been added or changed. Several of the tested features are hosed in endpoint.go or request.go in the api folder. Maybe it would be more natural to move some of these tests to request_tests.go. It could also be considered to create endpoint_test.go if this is structurally beneficial.

It should also be considered if NormalizeConnection can be tested directly and not via an endpoint.

What is the reason for "utils_main_test.go"? If we deviate from the pattern where "filename_test.go" test functions in "filename.go" it would be beneficial to add a line or two describing the motivation.