When I run
go test, my output:
--- FAIL: TestGETSearchSuccess (0.00s) Location: drivers_api_test.go:283 Error: Not equal: 200 (expected) != 204 (actual) --- FAIL: TestGETCOSearchSuccess (0.00s) Location: drivers_api_test.go:391 Error: Not equal: 200 (expected) != 204 (actual)
But after I run
go test again, all my tests pass.
Tests fail only when I reset my mysql database, and then run
go test for the first time.
GET request, I do a
POST request before to ensure that there is data created in the DB.
Could anyone help me with how to make sure that tests are run sequentially? That is the
POST requests are run before the