Skip to content

Commit 595f058

Browse files
committed
Remove the last remaining XFAIL on V4Pages.py
Fix some tests with invalid expectations, or which relied on implementation details like matching the internal server error string.
1 parent 2a9b1a5 commit 595f058

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

tests/lit.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ else:
6464

6565
config.available_features.add(platform.system())
6666

67-
config.available_features.add('TODO-FIXME')
68-
6967
# Enable coverage.py reporting, assuming the coverage module has been installed
7068
# and sitecustomize.py in the virtualenv has been modified appropriately.
7169
if lit_config.params.get('check-coverage', None):

tests/server/ui/V4Pages.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# XFAIL: TODO-FIXME
2-
31
# Perform basic sanity checking of the V4 UI pages.
42
#
53
# create temporary instance
@@ -458,9 +456,9 @@ def main():
458456
client, '/v4/nts/daily_report/2012/5/04', "Execution Time")
459457
check_table_content(result_table_20120504,
460458
[["test1", ""],
461-
["", "machine2", "1.000", "-", "900.00%", ""],
459+
["", "machine2", "1.000", "-", "10.000", ""],
462460
["test2", ""],
463-
["", "machine2", "FAIL", "-", "PASS", ""]])
461+
["", "machine2", "FAIL", "-", "-", ""]])
464462
check_table_links(result_table_20120504,
465463
[[],
466464
["/db_default/v4/nts/graph?plot.0=2.4.2&highlight_run=6"],
@@ -477,13 +475,13 @@ def main():
477475
client, '/v4/nts/daily_report/2012/5/13?num_days=3', "Execution Time")
478476
check_table_content(result_table_20120513,
479477
[["test6", ""],
480-
["", "machine2", "1.000", "FAIL", "PASS", ""],
478+
["", "machine2", "1.000", "FAIL", "1.200", ""],
481479
["test_hash1", ""],
482-
["", "machine2", "1.000", '-', '20.00%', ""],
480+
["", "machine2", "1.000", '1.000', '1.200', ""],
483481
["test_hash2", ""],
484-
["", "machine2", "1.000", '-', '20.00%', ""],
482+
["", "machine2", "1.000", '1.000', '1.200', ""],
485483
["test_mhash_on_run", ""],
486-
["", "machine2", "1.000", '-', '20.00%', ""], ])
484+
["", "machine2", "1.000", '1.000', '1.200', ""], ])
487485
check_table_links(result_table_20120513,
488486
[[],
489487
['/db_default/v4/nts/graph?plot.0=2.6.2&highlight_run=9'],
@@ -637,16 +635,14 @@ def main():
637635
lines_in_function = len(code_for_fn)
638636
assert 2 == lines_in_function
639637

640-
# Make sure the new option does not break anything
641-
check_html(client, '/db_default/v4/nts/graph?aggregation_function=mean&plot.0=1.3.2&submit=Update')
642-
check_json(client, '/db_default/v4/nts/graph?aggregation_function=mean&plot.0=1.3.2&json=true&submit=Update')
643-
check_html(client, '/db_default/v4/nts/graph?aggregation_function=mean&plot.0=1.3.2')
644-
check_json(client, '/db_default/v4/nts/graph?aggregation_function=mean&plot.0=1.3.2&json=true')
645-
check_html(client, '/db_default/v4/nts/graph?aggregation_function=nonexistent&plot.0=1.3.2', expected_code=404)
638+
# Test with various aggregation functions
639+
for fn in ['mean', 'median', 'min', 'max']:
640+
check_html(client, f'/db_default/v4/nts/graph?aggregation_function={fn}&plot.7.2=2.7.2')
641+
check_json(client, f'/db_default/v4/nts/graph?aggregation_function={fn}&plot.7.2=2.7.2&json=true')
642+
check_html(client, '/db_default/v4/nts/graph?aggregation_function=nonexistent&plot.7.2=2.7.2', expected_code=404)
646643
app.testing = False
647644
error_page = check_html(client, '/explode', expected_code=500)
648-
assert re.search("division (or modulo )?by zero",
649-
error_page.get_data(as_text=True))
645+
assert re.search("InternalServerError", error_page.get_data(as_text=True))
650646

651647
error_page = check_html(client, '/gone', expected_code=404)
652648
assert "test" in error_page.get_data(as_text=True)

0 commit comments

Comments
 (0)