File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 55 "log/slog"
66 "net/http"
77 "net/http/httptest"
8+ "slices"
89 "sort"
910 "testing"
1011
@@ -273,8 +274,11 @@ func TestHTTPHandlerRoutes(t *testing.T) {
273274 var capturedInventory * inventory.Inventory
274275 var capturedCtx context.Context
275276
276- // Create feature checker that reads from context (same as production)
277- featureChecker := createHTTPFeatureChecker ()
277+ // Create feature checker that reads from context without whitelist validation
278+ // (the whitelist is tested separately; here we test the filtering logic)
279+ featureChecker := func (ctx context.Context , flag string ) (bool , error ) {
280+ return slices .Contains (ghcontext .GetHeaderFeatures (ctx ), flag ), nil
281+ }
278282
279283 apiHost , err := utils .NewAPIHost ("https://api.github.com" )
280284 require .NoError (t , err )
You can’t perform that action at this time.
0 commit comments