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

Dev: unittests: Rewrite test_findln_by_timestamp by using fixed date #1650

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

liangxin1300
Copy link
Collaborator

@liangxin1300 liangxin1300 commented Jan 2, 2025

Fix issue #1649

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.73%. Comparing base (66a75d1) to head (e513b9f).
Report is 8 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
integration 53.55% <ø> (-0.02%) ⬇️
unit 53.09% <ø> (-0.02%) ⬇️

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

see 6 files with indirect coverage changes

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

target_time_stamp = crmutils.parse_to_timestamp(target_time+' '+str(this_year))
target_time_str = "Apr 03 13:10"
target_time = datetime.datetime.strptime(target_time_str, "%b %d %H:%M")
now = datetime.datetime.now()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use some stable test cases, instead of relying on current time?

@liangxin1300 liangxin1300 changed the title Fix: unittests: Determine the year of syslog Dev: unittests: Rewrite test_findln_by_timestamp by using fixed date Jan 2, 2025
@liangxin1300 liangxin1300 merged commit 2402198 into ClusterLabs:master Jan 2, 2025
32 checks passed
liangxin1300 added a commit that referenced this pull request Jan 2, 2025
liangxin1300 added a commit that referenced this pull request Jan 6, 2025
Some test cases should be duplicated after #1650 merged
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