@@ -10,7 +10,7 @@ func TestWithPathRegex_MatchesCaseSensitiveModifier(t *testing.T) {
10
10
t .Parallel ()
11
11
12
12
want := "~ \" ^/coffee/[A-Z0-9]{3}\" "
13
- got := makePathRegex ("/coffee/[A-Z0-9]{3}" , map [string ]string {"nginx.org/path-regex" : "case_sensitive" })
13
+ got := makeLocationPath ("/coffee/[A-Z0-9]{3}" , map [string ]string {"nginx.org/path-regex" : "case_sensitive" })
14
14
if got != want {
15
15
t .Errorf ("got: %s, want: %s" , got , want )
16
16
}
@@ -20,7 +20,7 @@ func TestWithPathRegex_MatchesCaseInsensitiveModifier(t *testing.T) {
20
20
t .Parallel ()
21
21
22
22
want := "~* \" ^/coffee/[A-Z0-9]{3}\" "
23
- got := makePathRegex ("/coffee/[A-Z0-9]{3}" , map [string ]string {"nginx.org/path-regex" : "case_insensitive" })
23
+ got := makeLocationPath ("/coffee/[A-Z0-9]{3}" , map [string ]string {"nginx.org/path-regex" : "case_insensitive" })
24
24
if got != want {
25
25
t .Errorf ("got: %s, want: %s" , got , want )
26
26
}
@@ -30,7 +30,7 @@ func TestWithPathReqex_MatchesExactModifier(t *testing.T) {
30
30
t .Parallel ()
31
31
32
32
want := "= \" /coffee\" "
33
- got := makePathRegex ("/coffee" , map [string ]string {"nginx.org/path-regex" : "exact" })
33
+ got := makeLocationPath ("/coffee" , map [string ]string {"nginx.org/path-regex" : "exact" })
34
34
if got != want {
35
35
t .Errorf ("got: %s, want: %s" , got , want )
36
36
}
@@ -40,7 +40,7 @@ func TestWithPathReqex_DoesNotMatchModifier(t *testing.T) {
40
40
t .Parallel ()
41
41
42
42
want := "/coffee"
43
- got := makePathRegex ("/coffee" , map [string ]string {"nginx.org/path-regex" : "bogus" })
43
+ got := makeLocationPath ("/coffee" , map [string ]string {"nginx.org/path-regex" : "bogus" })
44
44
if got != want {
45
45
t .Errorf ("got: %s, want: %s" , got , want )
46
46
}
@@ -50,7 +50,7 @@ func TestWithPathReqex_DoesNotMatchEmptyModifier(t *testing.T) {
50
50
t .Parallel ()
51
51
52
52
want := "/coffee"
53
- got := makePathRegex ("/coffee" , map [string ]string {"nginx.org/path-regex" : "" })
53
+ got := makeLocationPath ("/coffee" , map [string ]string {"nginx.org/path-regex" : "" })
54
54
if got != want {
55
55
t .Errorf ("got: %s, want: %s" , got , want )
56
56
}
@@ -60,7 +60,7 @@ func TestWithPathReqex_DoesNotMatchBogusAnnotationName(t *testing.T) {
60
60
t .Parallel ()
61
61
62
62
want := "/coffee"
63
- got := makePathRegex ("/coffee" , map [string ]string {"nginx.org/bogus-annotation" : "" })
63
+ got := makeLocationPath ("/coffee" , map [string ]string {"nginx.org/bogus-annotation" : "" })
64
64
if got != want {
65
65
t .Errorf ("got: %s, want: %s" , got , want )
66
66
}
0 commit comments