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 <noreply@anthropic.com>
This commit is contained in:
parent
0de9922e7d
commit
3c8413b7a6
@ -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},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user