fix: 修复因移除 SimpleMode 导致的测试编译错误
- 移除 api_contract_test.go 中的 SettingKeySimpleMode 引用 - 移除期望响应中的 simple_mode 字段 - 修复 NewSettingHandler 调用参数数量
This commit is contained in:
@@ -281,7 +281,6 @@ func TestAPIContracts(t *testing.T) {
|
||||
|
||||
service.SettingKeyDefaultConcurrency: "5",
|
||||
service.SettingKeyDefaultBalance: "1.25",
|
||||
service.SettingKeySimpleMode: "false",
|
||||
})
|
||||
},
|
||||
method: http.MethodGet,
|
||||
@@ -310,8 +309,7 @@ func TestAPIContracts(t *testing.T) {
|
||||
"contact_info": "support",
|
||||
"doc_url": "https://docs.example.com",
|
||||
"default_concurrency": 5,
|
||||
"default_balance": 1.25,
|
||||
"simple_mode": false
|
||||
"default_balance": 1.25
|
||||
}
|
||||
}`,
|
||||
},
|
||||
@@ -387,7 +385,7 @@ func newContractDeps(t *testing.T) *contractDeps {
|
||||
authHandler := handler.NewAuthHandler(cfg, nil, userService)
|
||||
apiKeyHandler := handler.NewAPIKeyHandler(apiKeyService)
|
||||
usageHandler := handler.NewUsageHandler(usageService, apiKeyService)
|
||||
adminSettingHandler := adminhandler.NewSettingHandler(settingService, nil, nil)
|
||||
adminSettingHandler := adminhandler.NewSettingHandler(settingService, nil)
|
||||
|
||||
jwtAuth := func(c *gin.Context) {
|
||||
c.Set(string(middleware.ContextKeyUser), middleware.AuthSubject{
|
||||
|
||||
Reference in New Issue
Block a user