Skip to content

Commit c6d66b2

Browse files
committed
[tests] add test for map_cidr
Change-Id: I9258f394dce887dab89069edac5a5170096a915b
1 parent d0f7f1e commit c6d66b2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/pylt/tests/t-map-cidr.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- coding: utf-8 -*-
2+
3+
from pylt.requests import CurlRequest
4+
5+
6+
class TestSimpleCidrMap(CurlRequest):
7+
URL = "/test.txt"
8+
EXPECT_RESPONSE_BODY = "abc"
9+
EXPECT_RESPONSE_CODE = 200
10+
config = """
11+
map_cidr [
12+
"127.0.0.0/8" => {
13+
},
14+
default => {
15+
respond 402 => "";
16+
},
17+
];
18+
respond 200 => "abc";
19+
"""

0 commit comments

Comments
 (0)