Repository navigation
Commit 7667215
fix: Reset the global security manager after the permissions fixture
The security_manager fixture in tests/unit/permissions/conftest.py calls
set_security_manager(), which populates the module-level singleton in
feast.permissions.security_manager, and never resets it. Every later test
in the same pytest process that serves a request then runs against the
leaked mock security manager and is rejected with 401 Unauthorized: running
tests/unit/permissions/ together with tests/unit/test_feature_server.py in
one process fails 26 feature server tests on master. CI masks this because
pytest-xdist distributes the modules across workers.
Convert the fixture to yield and reset via no_security_manager() on
teardown, the same cleanup the integration auth tests already use.
Signed-off-by: Larry Singleton <[email protected]>1 parent c8628eb commit 7667215
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
0 commit comments