Skip to content

Commit e393fc7

Browse files
committed
Revert "Add more test cases"
This reverts commit f10881d. We always allow 127.0.0.1 so not a good test
1 parent f10881d commit e393fc7

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

library/sources/http-server/ipAllowedToAccessRoute.test.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,6 @@ t.test("public subroute of private route", async () => {
127127
),
128128
false
129129
);
130-
t.same(
131-
ipAllowedToAccessRoute(
132-
{
133-
...context,
134-
url: "/private/test",
135-
route: "/private/test",
136-
method: "GET",
137-
remoteAddress: "127.0.0.1",
138-
},
139-
agent
140-
),
141-
true
142-
);
143-
144130
t.same(
145131
ipAllowedToAccessRoute(
146132
{
@@ -154,19 +140,6 @@ t.test("public subroute of private route", async () => {
154140
),
155141
true
156142
);
157-
t.same(
158-
ipAllowedToAccessRoute(
159-
{
160-
...context,
161-
url: "/private/public",
162-
route: "/private/public",
163-
method: "GET",
164-
remoteAddress: "127.0.0.1",
165-
},
166-
agent
167-
),
168-
true
169-
);
170143

171144
// No exact match and not all matching endpoints allow the IP address
172145
t.same(
@@ -182,19 +155,6 @@ t.test("public subroute of private route", async () => {
182155
),
183156
false
184157
);
185-
t.same(
186-
ipAllowedToAccessRoute(
187-
{
188-
...context,
189-
url: "/private/public/test",
190-
route: "/private/public/test",
191-
method: "GET",
192-
remoteAddress: "127.0.0.1",
193-
},
194-
agent
195-
),
196-
true
197-
);
198158
});
199159

200160
t.test("it allows request if configuration is broken", async () => {

0 commit comments

Comments
 (0)