Skip to content

Commit

Permalink
contrib/gofiber/fiber.v2: improve UserContext test in Middleware for …
Browse files Browse the repository at this point in the history
…span creation
  • Loading branch information
tonyduburque committed Jan 15, 2025
1 parent 1fdf56d commit bac65b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/gofiber/fiber.v2/fiber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ func TestUserContext(t *testing.T) {
assert.NotEmpty(c.UserContext())

// checks that the user context still has the information provided before using the middleware
_, ok := c.UserContext().Value(fooKey).(string)
foo, ok := c.UserContext().Value(fooKey).(string)
assert.True(ok)
assert.Equal(foo, "bar")

span, _ := tracer.StartSpanFromContext(c.UserContext(), "http.request")
defer span.Finish()
Expand Down

0 comments on commit bac65b3

Please sign in to comment.