Skip to content

Fix flaky Test_validAuth in connect middleware - #21

Merged
maoueh merged 1 commit into
developfrom
feature/flaky-tests-maybe-
Oct 9, 2026
Merged

maoueh merged 1 commit into
developfrom
feature/flaky-tests-maybe-

Conversation

@maoueh

@maoueh maoueh commented Oct 9, 2026

Copy link
Copy Markdown
Contributor
  • The test authenticator copied request headers using their original casing, so X-SUBSTREAMS-Ll and x-substreams-ll both ended up in the map. WithTrustedHeaders lower-cases every key, so the two collided and map iteration order decided which value won. The test failed about half the time.
  • The test authenticator now lower-cases keys, the same way the real authenticators (trust, secret, grpc) do.
  • The test now uses stretchr/testify/assert instead of test-go/testify, and the unused test-go/testify dependency is gone.

The test authenticator kept request header casing, so X-SUBSTREAMS-Ll and
x-substreams-ll collided once WithTrustedHeaders lower-cased them and map
iteration order picked the winner. Lower-case keys like real authenticators
do, and switch to stretchr/testify assert.
@dfuse-bot
dfuse-bot requested a review from sduchesneau October 9, 2026 15:59
@maoueh
maoueh merged commit 75940c1 into develop Oct 9, 2026
3 checks passed
@maoueh
maoueh deleted the feature/flaky-tests-maybe- branch October 9, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants