mirror of
https://github.com/status-im/consul.git
synced 2025-02-13 22:26:35 +00:00
Replace the large table of tests with individual calls to run(). By using runCase, failure messages will include the line number for the test case, as well as a line number from the test functions. Example: === FAIL: agent/config TestLoad_IntegrationWithFlags/failing_case (0.01s) runtime_test.go:4721: case: failing case runtime_test.go:4864: error "data_dir cannot be empty" does not contain "I expected this error" Previous: runtime_test.go:4864: error "data_dir cannot be empty" does not contain "I expected this error" Without the line number to the testCase data, debugging these tests is difficult. It is impossible to jump directly to the test case, and difficult to find the location because of many similarly named cases.