Skip to content

Commit 52ea667

Browse files
author
Thomas Preud'homme
committed
Fix server/ui/V4Pages test
Commit cc9b7c4 changed redirect URL to be relative. However, it did not update the corresponding redirect tests due to them passing because of the cPerf issue fixed in f98bc1b. These tests are now failing. This commit fixes them. Reviewed By: cmatthews Differential Revision: https://reviews.llvm.org/D94635
1 parent 80ed0db commit 52ea667

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/server/ui/V4Pages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,9 @@ def main():
577577

578578
# Check the compare machine form gives correct redirects.
579579
resp = check_code(client, '/v4/nts/machine/2/compare?compare_to_id=3', expected_code=HTTP_REDIRECT)
580-
assert resp.headers['Location'] == "http://localhost/db_default/v4/nts/9?compare_to=4"
580+
assert resp.headers['Location'] == "/db_default/v4/nts/9?compare_to=4"
581581
resp = check_code(client, '/v4/nts/machine/3/compare?compare_to_id=2', expected_code=HTTP_REDIRECT)
582-
assert resp.headers['Location'] == "http://localhost/db_default/v4/nts/4?compare_to=9"
582+
assert resp.headers['Location'] == "/db_default/v4/nts/4?compare_to=9"
583583

584584
# Get the order summary page.
585585
check_html(client, '/v4/compile/all_orders')
@@ -666,8 +666,8 @@ def main():
666666
graph_to_sample = check_code(client, '/db_default/v4/nts/graph_for_sample/10/compile_time?foo=bar',
667667
expected_code=HTTP_REDIRECT)
668668
assert graph_to_sample.headers['Location'] in (
669-
"http://localhost/db_default/v4/nts/graph?foo=bar&plot.0=2.6.0",
670-
"http://localhost/db_default/v4/nts/graph?plot.0=2.6.0&foo=bar")
669+
"/db_default/v4/nts/graph?foo=bar&plot.0=2.6.0",
670+
"/db_default/v4/nts/graph?plot.0=2.6.0&foo=bar")
671671

672672
# Check that is we ask for a sample or invalid field, we explode with 400s.
673673
check_code(client, '/db_default/v4/nts/graph_for_sample/10000/compile_time?foo=bar',

0 commit comments

Comments
 (0)