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.icinga.com #11146] Unit test for LegacyTimePeriod #3931
Comments
Updated by mfriedrich on 2016-03-18 13:25:38 +00:00
|
Updated by mfriedrich on 2016-03-18 13:25:57 +00:00
|
Updated by jflach on 2016-03-18 14:48:15 +00:00
Looks good, I will merge this once Bug #11147 is fixed. You offered to submit a patch, does that offer still stand? :D |
Updated by atj on 2016-03-18 14:56:18 +00:00 jflach wrote:
Yes, I'm still happy to write a patch. Is there a preference on submitting diffs here vs. filing PRs on github? |
Updated by jflach on 2016-03-22 12:35:47 +00:00 Sorry for the slow response, I forgot to set myself as watcher. We prefer git formatted patches uploaded here, github pr fit awkwardly into our workflow. |
Updated by mfriedrich on 2016-04-22 09:03:29 +00:00 You can go with PRs containing a single commit (rebase, squash) as well. Adding a ".patch" after the url for the PR allows you to do magic things like
|
Updated by gbeutner on 2016-05-11 07:18:44 +00:00 The timestamps seem to be off by an hour:
|
Updated by gbeutner on 2016-05-11 07:23:27 +00:00
|
Updated by gbeutner on 2016-05-11 07:26:36 +00:00
|
Updated by atj on 2016-05-11 07:26:41 +00:00
Applied in changeset 1246d7d. |
Updated by gbeutner on 2016-05-11 16:07:48 +00:00 This breaks the Windows build:
|
Updated by gbeutner on 2016-05-11 16:07:59 +00:00
|
Updated by gbeutner on 2016-05-11 16:13:03 +00:00
I have reverted this patch (1246d7d) for now. Please provide an updated patch that works on Windows. |
Updated by atj on 2016-05-20 10:17:08 +00:00
Please try the updated version of the patch attached. Your commit included a call to timegm to fill the ref timestruct which was not in my original patch and is not included in this version as the tests pass without it. If it was added for a specific reason then please let me know. The changes I have made for Windows compatibility are based purely on the Microsoft documentation as unfortunately I don't have access to a Window system with Visual Studio etc. |
Fixed #5871 |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11146
Created by atj on 2016-02-11 15:06:51 +00:00
Assignee: atj
Status: Assigned (closed on 2016-05-11 07:26:41 +00:00)
Target Version: (none)
Last Update: 2016-05-20 10:17:08 +00:00 (in Redmine)
Whilst fixing #11132 I wrote a unit test for LegacyTimePeriod, which I have attached. The patch includes some additional tests for the "day X" and "day -X" timespecs, which are currently failing:
The returned values are the second to last day of the month. A separate issue will be created to address this.
Please review the patch and confirm if it is acceptable. I will write some additional tests if so as it seems like there are some bugs lurking in the code.
Attachments
Changesets
2016-05-11 07:23:39 +00:00 by atj 1246d7d
2016-05-11 16:12:20 +00:00 by (unknown) fc889eb
Relations:
The text was updated successfully, but these errors were encountered: