You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the intention is to allow particular tests to run some initialization steps before some shared test case logic, but I find the implementation confusing, especially how the loop body contains:
The first run() call does not run the test, but instead the (optional) initialization steps. I think we could make it clearer what's going on by renaming/refactoring some of this setup logic.
In addition, by running the initialization in the main test (instead of inside the sub-test), a failure of the initialization steps in one test case may prevent the remaining test cases from running.
The text was updated successfully, but these errors were encountered:
A few of the autocert tests are structured in an unconventional way, using a
map[string]func(t *testing.T) test
:pomerium/config/autocert_test.go
Line 66 in a95423b
pomerium/internal/autocert/manager_test.go
Line 390 in a95423b
I think the intention is to allow particular tests to run some initialization steps before some shared test case logic, but I find the implementation confusing, especially how the loop body contains:
pomerium/internal/autocert/manager_test.go
Lines 444 to 445 in a95423b
The first
run()
call does not run the test, but instead the (optional) initialization steps. I think we could make it clearer what's going on by renaming/refactoring some of this setup logic.In addition, by running the initialization in the main test (instead of inside the sub-test), a failure of the initialization steps in one test case may prevent the remaining test cases from running.
The text was updated successfully, but these errors were encountered: