From 9278167277be168a3b062acbfd1644c779e3dc6a Mon Sep 17 00:00:00 2001 From: mfgnik Date: Fri, 10 Apr 2020 00:07:41 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82,=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D1=8F=D1=8E=D1=89=D0=B8=D0=B9=20=D0=BA=D0=BE=D0=BD=D1=84?= =?UTF-8?q?=D0=B8=D0=B3,=20=D1=81=D0=BE=D1=81=D1=82=D0=BE=D1=8F=D1=89?= =?UTF-8?q?=D0=B8=D0=B9=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=B8?= =?UTF-8?q?=D0=B7=20endpoint.=20=D0=9B=D0=BE=D0=BC=D0=B0=D0=B5=D1=82=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B5,=20=D1=83=D0=B6=D0=B5=20=D1=80=D0=B5=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5,=20=D0=BF=D1=80=D0=BE=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=D1=8F=D1=89=D0=B5=D0=B5=20=D0=B2=D1=81=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firewall/cmd/firewall/main_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/firewall/cmd/firewall/main_test.go b/firewall/cmd/firewall/main_test.go index e301fe9..e69c70c 100644 --- a/firewall/cmd/firewall/main_test.go +++ b/firewall/cmd/firewall/main_test.go @@ -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: `