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.icinga.com #11875] Add debugging mode for Utility::GetTime #4251

Closed
icinga-migration opened this issue Jun 1, 2016 · 4 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Jun 1, 2016

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11875

Created by mfrosch on 2016-06-01 13:35:07 +00:00

Assignee: mfrosch
Status: Resolved (closed on 2016-06-09 12:30:04 +00:00)
Target Version: 2.5.0
Last Update: 2016-06-09 12:30:04 +00:00 (in Redmine)

Backport?: Not yet backported
Include in Changelog: 1

There is no way to manipulate time in a unit test of any sort.

I'll push a branch with a change that will add new functionality to Utility for setting time on demand.

To be used with I2_DEBUG enabled and only on demand.

Changesets

2016-06-01 13:35:36 +00:00 by (unknown) 9104e18

Allow debugging of Utility::GetTime

So we can run unit tests that expect a certain behavior based on time.

When Icinga 2 is compiled with I2_DEBUG one can use Utility::SetTime to
override the current system time, and lock it to this value.

refs #11875

2016-06-09 12:25:51 +00:00 by (unknown) a5abe1a

Allow debugging of Utility::GetTime

So we can run unit tests that expect a certain behavior based on time.

When Icinga 2 is compiled with I2_DEBUG one can use Utility::SetTime to
override the current system time, and lock it to this value.

fixes #11875

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jun 1, 2016

Updated by mfrosch on 2016-06-01 13:35:09 +00:00

  • Copied From set to 11874
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jun 8, 2016

Updated by gbeutner on 2016-06-08 07:16:27 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfrosch

Feel free to merge this into the master branch.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jun 8, 2016

Updated by gbeutner on 2016-06-08 07:16:38 +00:00

  • Target Version set to 2.5.0
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Jun 9, 2016

Updated by Anonymous on 2016-06-09 12:30:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset a5abe1a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.