Skip to content

Commit

Permalink
[test] Test the store statistics output
Browse files Browse the repository at this point in the history
  • Loading branch information
vodorok committed Oct 19, 2023
1 parent ef5d486 commit 76adc4a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions web/tests/functional/store/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,3 +492,23 @@ def test_store_limit(self):

_, out, _ = _call_cmd(store_cmd)
self.assertIn("Report Limit Exceeded", out)

def test_store_stats(self):
"""
Tests that the statistics printed during the store command
are deduplicated.
"""

run_name = "stats_test"
store_cmd = [
env.codechecker_cmd(), "store",
self._same_headers_workspace,
"--name", run_name,
"--url", env.parts_to_url(self._codechecker_cfg, 'test_project')
]

_, out, _ = _call_cmd(store_cmd)
# There are 9 individual reports, but only 6 unique.
# The statistics should only print the unique ones.
self.assertIn("Number of analyzer reports | 6",
out)

0 comments on commit 76adc4a

Please sign in to comment.