Commit Graph

39 Commits (main)

Author SHA1 Message Date
Juan Calderon-Perez 25e399213c
chore: Add support for go1.23 and golangci-lint v1.60.1 (#3101)
* Bump min go to 1.22, bump golangci-lint to v1.60.1, regenerate all msgp

* Fix golanci-lint issues

* Fix golanci-lint issues
2024-08-14 09:14:04 +02:00
Juan Calderon-Perez 0379cc59aa
fix: Inconsistent and flaky unit-tests (#2892)
* Fixes for some of the failing tests

* Add readiness check to serverStart()

* Use net/http client for tests listen test

* Use different key for this test

* Run Proxy Middleware tests in parallel. Add nil checks for potential issues pointed by nilaway

* Enable parallel client tests

* Do not run timing sensitive tests in parallel

* Remove TODO

* Revert Test_Proxy_DoTimeout_Timeout, and remove t.Parallel() for it

* Do not calculate favicon len on each handler call

* Revert logic change

* Increase timeout of SaveFile tests

* Do not run time sensitive tests in parallel

* The Agent can't be run in parallel

* Do not run time sensitive tests in parallel

* Fixes based on uber/nilaway

* Revert change to Client test

* Run parallel

* Update client_test.go

* Update client_test.go

* Update cache_test.go

* Update cookiejar_test.go

* Remove parallel for test using timeouts

* Remove t.Parallel() from logger middleware tests

* Do not use testify.require in a goroutine

* Fix import, and update golangci-lint

* Remove changes to template_chain.go

* Run more tests in parallel

* Add more parallel tests

* Add more parallel tests

* SetLogger can't run in parallel

* Run more tests in parallel, fix issue with goroutine in limiter middleware

* Update internal/storage/memory, add more benchmarks

* Increase sleep for csrf test by 100 milliseconds. Implement asserted and parallel benchmarks for Session middleware

* Add 100 milliseconds to sleep during test

* Revert name change

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

* fix: Inconsistent and flaky unit-tests

---------

Co-authored-by: M. Efe Çetin <efectn@protonmail.com>
Co-authored-by: René <rene@gofiber.io>
2024-03-08 20:03:13 +01:00
nickajacks1 3c4509f054
chore: Fix remaining testifylint errors (#2806) 2024-01-22 08:34:15 +01:00
Muhammed Efe Cetin 75bb02b87e
Merge remote-tracking branch 'origin/master' into v3-beta 2023-08-05 22:02:01 +03:00
M. Efe Çetin 9064eb6469
🧹 chore: drop go 1.16 support & update dependencies (#2374)
* 🧹 chore: drop go 1.16 support

* downgrade uniseg

* fix tests

* fix tests

* fix tests
2023-03-20 08:22:31 +01:00
Muhammed Efe Çetin 088cde594d
Merge remote-tracking branch 'origin/master' into v3-beta 2023-02-05 23:43:42 +03:00
leonklingele 167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules (#2286)
* golangci-lint: add and apply more stricter linting rules

* github: drop security workflow now that we use gosec linter inside golangci-lint

* github: use official golangci-lint CI linter

* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
M. Efe Çetin 5406560033
🧹 chore: make most tests parallel (#2299)
* 🧹 chore: make most tests parallel

* revert some tests

* revert some tests

* revert some tests
2023-01-15 23:21:37 +08:00
M. Efe Çetin 691d2e6ad5
🗑️ deprecate: go 1.14 & go 1.15 support deprecation (#2172)
* 🗑️ deprecate: go 1.14 & go 1.15 support deprecation
https://github.com/valyala/fasthttp/pull/1379

* fix tests
2022-10-26 11:51:50 +02:00
M. Efe Çetin 281e2f0046
v3 (feature): merge Listen methods & ListenConfig (#1930)
*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

*  v3: new Start method for app

* fix tests

* improve graceful shutdown

* update

* Start -> Listen

* rename test funcs.

* Add Test_Listen_Graceful_Shutdown test.

* add OnShutdownSuccess

* fix tests

* fix tests

* split listen & listener

* typo

* Add retry logic to tests

* Add retry logic to tests

* Add retry logic to tests

* Add retry logic to tests

Co-authored-by: René Werner <rene@gofiber.io>
2022-09-08 07:57:05 +02:00
Trim21 c964fda009
v3(tests): use testify for assertion (#2036)
* replace

* write

* rewrite more

* rewrite

* rewrite

* fix

* rewrite
2022-08-22 07:57:10 +02:00
Muhammed Efe Çetin f119794035
v3: replace io/ioutil by io and os, update version constant 2022-06-01 18:34:22 +03:00
Muhammed Efe Çetin 1188144d78
🎉 v3: init 2022-05-31 17:35:49 +03:00
Gusted 7b7dcf29f7
♻️ Tidy up the codebase (#1613)
* run gofmt

* add t.Helper()

* Simplify assigns

* Simplify make operation

* Remove unused field in struct

* Fix typo

* Run gofumpt ./

* Consistent spacing

* len(...) can never be negative

* Use ReplaceAll

* Simplify operation

* Remove deadcode

* Fix typo

* Tidy up `} else { if ...`

* Fix AssertEqual

* Remove t.Helper() to fix go1.14.15
2021-11-05 08:00:03 +01:00
Rupesh Harode 9dd39c0e55
🩹 Fix: corrects ipv6 loopback ip shown on UI (#1517)
Author:    Rupesh Harode <rupeshharode@gmail.com>

Co-authored-by: Rupesh Harode <rupesh.harode@dailyrounds.org>
2021-09-03 14:23:03 +02:00
Kiyon 00dbdd5fb3 👷 Add network type constant 2021-02-08 11:35:17 +08:00
Kiyon 0ec0f50cfd 🔥 Add network option 2021-02-07 13:55:13 +08:00
ReneWerner87 42755c30e6 Accelerate start process for many routes #1081 2021-01-24 13:02:21 +01:00
Fenny 8555f0bf7c 🧹 remove comment 2020-10-01 23:30:02 +02:00
Fenny 9fd68c62b0 ✏ update comments 2020-09-29 21:49:50 +02:00
kiyon 27cd8ad9c5 👷 improve app and prefork test cases 2020-09-15 09:02:24 +08:00
Fenny 2768ea2a77 🙌 make utils public
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:12:29 +02:00
Fenny a3cac71ae8 🔦 move utils to internal 2020-09-14 09:09:06 +02:00
Fenny ec5d66e7a8 v2 2020-09-13 11:20:11 +02:00
kiyon 86af9e486c 💯 remain code coverage 2020-07-18 10:42:22 +08:00
Fenny f6b09e59b3 🧙‍♂️ Add IPv6 Support in Prefork mode 2020-07-18 01:44:23 +02:00
Fenny 8a74cc3843 🧙‍♂️ Add IPv6 support for Prefork 2020-07-18 01:41:18 +02:00
Fenny 5218eb462d 🍡 o͡͡͡╮༼ ಠДಠ ༽╭o͡͡͡━☆゚.*・。゚ IPv6 support for Prefork 2020-07-18 01:36:56 +02:00
Fenny d77c2691f6 🩹 ༼ ಥل͟ಥ ༽ 2020-07-18 01:31:39 +02:00
Fenny c9cb30766c 🩹 ( ͡↑ ͜ʖ ͡↑) Test is failing 2020-07-18 01:29:03 +02:00
Fenny 29c9a97556 🩹 Update IPv6 test 2020-07-18 01:11:16 +02:00
kiyon 227c751abc 🌼 separate different logic on each OS for child process to watch if master process exits 2020-07-17 06:51:57 +08:00
kiyon 30a704b5f9 👷 improve test coverage 2020-07-16 16:42:36 +08:00
Fenny da85c85c14 🧪 Increase test coverage: 96% 2020-07-15 17:43:30 +02:00
Fenny 9275592a51 🩹 Fix Prefork Test 2020-07-15 15:20:10 +02:00
Fenny d66d6a9cd5 🩹 Fix prefork test case 2020-07-15 15:16:43 +02:00
Fenny 7fc4b37dfb 🩹 Fix prefork test 2020-07-15 15:10:59 +02:00
kiyon 1499e2beb2 💯 cover prefork error statement 2020-07-15 15:13:02 +08:00
kiyon b0e3979437 👍 improve prefork test coverage 2020-07-15 10:37:57 +08:00