File tree Expand file tree Collapse file tree 1 file changed +29
-1
lines changed
test/rules/src/https_everywhere_checker Expand file tree Collapse file tree 1 file changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,35 @@ def _determineTestApplication(self):
178178 else :
179179 self .test_application_problems .append ("%s: No rule or exclusion applies to test URL %s" % (
180180 self .filename , test .url ))
181- self .determine_test_application_run = True
181+
182+ for test in self .tests :
183+ urlParts = urlparse (test .url )
184+ hostname = urlParts .hostname
185+
186+ isCovered = hostname in self .targets
187+
188+ if not isCovered :
189+ parts = hostname .split ('.' )
190+
191+ for i in range (len (parts )):
192+ tmp = parts [i ]
193+ parts [i ] = '*'
194+
195+ if '.' .join (parts ) in self .targets :
196+ isCovered = True
197+ break
198+
199+ if '.' .join (parts [i :len (parts )]) in self .targets :
200+ isCovered = True
201+ break
202+
203+ parts [i ] = tmp
204+
205+ if not isCovered :
206+ self .test_application_problems .append ("%s: No target applies to test URL %s" % (
207+ self .filename , test .url ))
208+
209+ self .determine_test_application_run = True
182210 return self .test_application_problems
183211
184212 def getTargetValidityProblems (self ):
You can’t perform that action at this time.
0 commit comments