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: allow for positive or negative offset time zones #842

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Xel-Naha
Copy link

Description

When testing ANTA logging format on switches with timezone Europe/London we got fail on the test VerifyLoggingTimestamp. Looking at the regex it seems to match on negative offsets:

r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{6}-d{2}:\d{2}"

-d{2}:\d{2}"

to allow for positive offsets change this to allow either negative - or positive +

[+-]d{2}:\d{2}"

@Xel-Naha Xel-Naha changed the title allow for positive or negative offset time zones fix: allow for positive or negative offset time zones Sep 30, 2024
@gmuloc
Copy link
Collaborator

gmuloc commented Sep 30, 2024

Hello @Xel-Naha thanks for opening this PR - could you please look at adding some test to make sure we capture this in our CI? If you need pointers let me know!

@Xel-Naha
Copy link
Author

Hello @Xel-Naha thanks for opening this PR - could you please look at adding some test to make sure we capture this in our CI? If you need pointers let me know!

hi @gmuloc happy to write a test but some pointers would certainly be helpful,

Copy link

codspeed-hq bot commented Oct 2, 2024

CodSpeed Performance Report

Merging #842 will not alter performance

Comparing Xel-Naha:main (b654ce1) with main (fc644a1)

Summary

✅ 4 untouched benchmarks

Copy link
Author

@Xel-Naha Xel-Naha left a comment

Choose a reason for hiding this comment

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

Added unit test for positive offset and rename original unit test to negative offset. @gmuloc mind reviewing and letting me know if anything else needs adding / changing? thanks!

anta/tests/logging.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Oct 3, 2024

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