Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): failures of test_eap_reports in some test env #4310

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

xiangce
Copy link
Contributor

@xiangce xiangce commented Dec 17, 2024

  • the timezone update in compliance tests breaks the
    eap_reports tests which are time-sensitive

All Pull Requests:

Check all that apply:

  • Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
  • No Sensitive Data in this change?
  • Is this PR to correct an issue?
  • Is this PR an enhancement?

Complete Description of Additions/Changes:

  • in some test env, the eap_report test always fail as below:
FAILED insights/tests/datasources/test_eap_reports.py::test_eap_one_match_paths - AssertionError: assert 2 == 1
 +  where 2 = len(['/var/tmp/insights-runtimes/uploads/file_a.json', '/var/tmp/insights-runtimes/uploads/file_b.json'])
FAILED insights/tests/datasources/test_eap_reports.py::test_eap_zero_match_paths - assert <function eap_report_files at 0x7fa4499e7420> not in <insights.core.dr.Broker object at 0x7fa44962e910>
  • it's because that the two tests are time-sensitive,
    however the change of "TZ" in compliance test breaks
    the timestamp of file creating in the eap_reports tests.

- the timezone update in compliance tests breaks the eap_reports
  tests which are time sensitive

Signed-off-by: Xiangce Liu <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.17%. Comparing base (d7cff2e) to head (f26dc5d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4310   +/-   ##
=======================================
  Coverage   77.17%   77.17%           
=======================================
  Files         765      765           
  Lines       41753    41753           
  Branches     8815     8815           
=======================================
+ Hits        32221    32223    +2     
+ Misses       8464     8463    -1     
+ Partials     1068     1067    -1     
Flag Coverage Δ
unittests 77.16% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xiangce
Copy link
Contributor Author

xiangce commented Dec 17, 2024

This is a tiny update of tests, let's merge it to avoid the local test failures first.

@xiangce xiangce merged commit 952f219 into RedHatInsights:master Dec 17, 2024
16 checks passed
@xiangce xiangce deleted the fix_eap_test branch December 17, 2024 13:11
xiangce added a commit that referenced this pull request Jan 2, 2025
- the timezone update in compliance tests breaks the eap_reports
  tests which are time sensitive

Signed-off-by: Xiangce Liu <[email protected]>
(cherry picked from commit 952f219)
xiangce added a commit that referenced this pull request Jan 2, 2025
- the timezone update in compliance tests breaks the eap_reports
  tests which are time sensitive

Signed-off-by: Xiangce Liu <[email protected]>
(cherry picked from commit 952f219)
(cherry picked from commit a2e3110)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants