fiber/docs/api
Giovanni Rivera f8b490f89e
🔥 Feature: Add TestConfig to app.Test() for configurable testing (#3161)
* 🔥 Feature: Add thread-safe reading from a closed testConn

* 🔥 Feature: Add TestConfig to app.Test()

This commit is summarized as:
- Add the struct `TestConfig` as a parameter for `app.Test()` instead of `timeout`
- Add documentation of `TestConfig` to docs/api/app.md and in-line
- Modify middleware to use `TestConfig` instead of the previous implementation

Fixes #3149

* 📚 Doc: Add more details about TestConfig in docs

* 🩹 Fix: Correct testConn tests

- Fixes Test_Utils_TestConn_Closed_Write
- Fixes missing regular write test

* 🎨 Style: Respect linter in Add App Test Config

* 🎨 Styles: Update app.go to respect linter

* ♻️ Refactor: Rename TestConfig's ErrOnTimeout to FailOnTimeout

- Rename TestConfig.ErrOnTimeout to TestConfig.FailOnTimeout
- Update documentation to use changed name
  - Also fix stale documentation about passing Timeout as a
    single argument

* 🩹 Fix: Fix typo in TestConfig struct comment in app.go

* ♻️ Refactor: Change app.Test() fail on timeouterror to os.ErrDeadlineExceeded

* ♻️ Refactor:Update middleware that use the same TestConfig to use a global variable

* 🩹 Fix: Update error from FailOnTimeout to os.ErrDeadlineExceeded in tests

* 🩹 Fix: Remove errors import from middlware/proxy/proxy_test.go

* 📚 Doc: Add `app.Test()` config changes to docs/whats_new.md

* ♻ Refactor: Change app.Test() and all uses to accept 0 as no timeout instead of -1

* 📚 Doc: Add TestConfig option details to docs/whats_new.md

* 🎨 Styles: Update docs/whats_new.md to respect markdown-lint

* 🎨 Styles: Update docs/whats_new.md to use consistent style for TestConfig options description

---------

Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-22 08:43:38 +01:00
..
_category_.json [v3 Maintenance]: Consolidate and Document Core Changes in v3 (#2934) 2024-04-23 08:18:19 +02:00
app.md 🔥 Feature: Add TestConfig to app.Test() for configurable testing (#3161) 2024-11-22 08:43:38 +01:00
bind.md 📚 Doc: Updates to API documentation and README (#3205) 2024-11-16 15:24:14 +01:00
constants.md v3: Add support for consistent documentation using markdownlint (#3064) 2024-07-11 15:21:56 +02:00
ctx.md 📚 Doc: Updates to Context documentation (#3206) 2024-11-18 10:10:59 +01:00
fiber.md 🔥Feature: Add support for TrustProxy (#3170) 2024-10-17 08:29:03 +02:00
hooks.md 📚 Doc: Updates to API documentation and README (#3205) 2024-11-16 15:24:14 +01:00
log.md 📚 Doc: Updates to API documentation and README (#3205) 2024-11-16 15:24:14 +01:00
redirect.md 📚 Doc: Updates to API documentation and README (#3205) 2024-11-16 15:24:14 +01:00