@@ -58,6 +58,48 @@ def test_disable_tracing_url_explicit(self):
5858 disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
5959 self .assertTrue (disable_tracing )
6060
61+ def test_disable_tracing_url_partial (self ):
62+ url = 'http://127.0.0.1:8080/test_no_tracing'
63+ excludelist_paths = ['test' ]
64+
65+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
66+ self .assertTrue (disable_tracing )
67+
68+ def test_disable_tracing_url_partial_regex_match (self ):
69+ url = 'http://127.0.0.1:8080/test_no_tracing'
70+ excludelist_paths = ['^test' ]
71+
72+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
73+ self .assertTrue (disable_tracing )
74+
75+ def test_disable_tracing_url_partial_regex_nomatch (self ):
76+ url = 'http://127.0.0.1:8080/test_no_tracing'
77+ excludelist_paths = ['test$' ]
78+
79+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
80+ self .assertFalse (disable_tracing )
81+
82+ def test_disable_tracing_url_root (self ):
83+ url = 'http://127.0.0.1:8080/'
84+ excludelist_paths = ['' ]
85+
86+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
87+ self .assertTrue (disable_tracing )
88+
89+ def test_disable_tracing_url_root_regex (self ):
90+ url = 'http://127.0.0.1:8080/'
91+ excludelist_paths = ['^$' ]
92+
93+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
94+ self .assertTrue (disable_tracing )
95+
96+ def test_disable_tracing_url_root_empty_exclude (self ):
97+ url = 'http://127.0.0.1:8080/test_no_tracing'
98+ excludelist_paths = ['' ]
99+
100+ disable_tracing = utils .disable_tracing_url (url , excludelist_paths )
101+ self .assertTrue (disable_tracing )
102+
61103 def test_disable_tracing_hostname_default (self ):
62104 url = '127.0.0.1:8080'
63105
0 commit comments