labstack / echo

High performance, minimalist Go web framework
https://echo.labstack.com
MIT License
29.94k stars 2.23k forks source link

Refactor TestBasicAuth to utilize table-driven test format #2688

Closed ErikOlson closed 3 weeks ago

ErikOlson commented 1 month ago

Summary

This PR refactors the basic_auth_test.go file to use a table-driven test approach. The new structure improves readability, simplifies the addition of new test cases, and makes it easier to maintain the tests as the codebase evolves.

What was changed

Why the change was made

Table-driven tests provide a more scalable way to manage and add test cases. This refactor ensures that future test cases can be added with minimal repetition.

How it was tested

Follow on

Am willing to refactor more tests if the table-driven format is desirable