From 3c8413b7a61aaa1dd48c4dcab48e5fe29456f9d5 Mon Sep 17 00:00:00 2001 From: xfy Date: Thu, 30 Apr 2026 08:01:43 +0800 Subject: [PATCH] fix(test): add missing Type field in BenchmarkE2EBasicAuth The AuthConfig struct requires Type="basic" for NewBasicAuth to validate successfully. Without this field, the benchmark fails with "unsupported auth type: ". Co-Authored-By: Claude Opus 4.7 --- internal/integration/e2e_bench_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/integration/e2e_bench_test.go b/internal/integration/e2e_bench_test.go index c1a72da..a6d51f1 100644 --- a/internal/integration/e2e_bench_test.go +++ b/internal/integration/e2e_bench_test.go @@ -1449,6 +1449,7 @@ func BenchmarkE2EBasicAuth(b *testing.B) { // 创建 Basic Auth 中间件(使用 bcrypt 哈希) bcryptPassword, _ := security.HashPassword("testpass", security.HashBcrypt) auth, err := security.NewBasicAuth(&config.AuthConfig{ + Type: "basic", RequireTLS: false, Users: []config.User{ {Name: "admin", Password: bcryptPassword},