mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
test_urls: Use /api instead of /help pages for some tests.
We are going to move the help center to starlight soon and the tests won't be able to access that help center until we solve things in a followup issue. We move some of the urls being tested from /help to /api to not loose coverage on those tests.
This commit is contained in:
committed by
Tim Abbott
parent
33f602fa98
commit
9ec15e99bd
@@ -570,6 +570,15 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N
|
||||
|
||||
untested_patterns -= exempt_patterns
|
||||
|
||||
# A lot of help/ URLs are part of the untested patterns, which
|
||||
# is due to the switch to the new help center. We exempt them
|
||||
# programmatically below.
|
||||
untested_patterns = {
|
||||
untested_pattern
|
||||
for untested_pattern in untested_patterns
|
||||
if not untested_pattern.startswith("help/")
|
||||
}
|
||||
|
||||
var_dir = "var" # TODO make sure path is robust here
|
||||
fn = os.path.join(var_dir, "url_coverage.txt")
|
||||
with open(fn, "wb") as f:
|
||||
@@ -578,7 +587,7 @@ def write_instrumentation_reports(full_suite: bool, include_webhooks: bool) -> N
|
||||
if full_suite:
|
||||
print(f"INFO: URL coverage report is in {fn}")
|
||||
|
||||
if full_suite and len(untested_patterns): # nocoverage -- test suite error handling
|
||||
if full_suite and untested_patterns: # nocoverage -- test suite error handling
|
||||
print("\nERROR: Some URLs are untested! Here's the list of untested URLs:")
|
||||
for untested_pattern in sorted(untested_patterns):
|
||||
print(f" {untested_pattern}")
|
||||
|
||||
Reference in New Issue
Block a user