Добавил тест, проверяющий конфиг, состоящий только из endpoint. Ломает мое, уже решение, проходящее все остальные тесты.
This commit is contained in:
parent
3f16dea924
commit
9278167277
1 changed files with 14 additions and 0 deletions
|
@ -157,6 +157,20 @@ rules:
|
|||
endpoint: "/login",
|
||||
expected: result{code: http.StatusOK, body: `{"user_id": 123}`},
|
||||
},
|
||||
{
|
||||
name: "empty-rule",
|
||||
conf: `
|
||||
rules:
|
||||
- endpoint: "/list"
|
||||
`,
|
||||
service: echoService,
|
||||
makeRequest: func() *resty.Request {
|
||||
return c.R().
|
||||
SetBody(`{"user_id": 123}`)
|
||||
},
|
||||
endpoint: "/list",
|
||||
expected: result{code: http.StatusOK, body: `{"user_id": 123}`},
|
||||
},
|
||||
{
|
||||
name: "bad-user-agent",
|
||||
conf: `
|
||||
|
|
Loading…
Reference in a new issue