icinga2/test
Julian Brost c45829b59f Timeperiods: fix off by one when calculating n-th last weekday of the month
A day specification like "monday -1" refers to the last Monday of the month.
However, there was an off by one if the first day of the next month is the same
day of the week, i.e. a Monday in this example.

LegacyTimePeriod::FindNthWeekday() picks a day to start the search for the day
in question. When given a negative n to search for the n-th last day, it
wrongly used the first day of the following month as the start and counted it
as if it was within the current month. This resulted in a 1/7 chance that the
result was one week too late.

This is fixed by using the last day of the current month instead.
2024-08-07 12:06:05 +02:00
..
config Remove unnecessary imports from unit test config 2016-08-28 10:41:46 +02:00
livestatus Livestatus: Fix "class" filter for log table 2015-11-26 19:15:54 +01:00
CMakeLists.txt Timeperiods: fix off by one when calculating n-th last weekday of the month 2024-08-07 12:06:05 +02:00
base-array.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-base64.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-convert.cpp Convert::ToString(double): handle integral values too large for long long correctly 2021-04-27 17:31:50 +02:00
base-dictionary.cpp Dictionary: Make sure underlaying map is ordered 2021-11-12 13:34:57 +01:00
base-fifo.cpp Stream#Read(): remove de facto unused param allow_partial 2023-07-13 16:55:48 +02:00
base-json.cpp JsonEncode(): encode non-[]/{} objects as strings, not null 2021-04-30 15:49:52 +02:00
base-match.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-netstring.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-object-packer.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-object.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-serialize.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-shellescape.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-stacktrace.cpp Stacktrace test: try to prevent inlining even harder 2021-03-01 16:08:06 +01:00
base-stream.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-string.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-timer.cpp Use Timer::Create() instead of new Timer() 2023-04-04 10:35:20 +02:00
base-tlsutility.cpp Test IsCertUptodate() and IsCaUptodate() 2023-12-18 15:28:11 +01:00
base-type.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
base-utility.cpp Utility: add a function to truncate strings while avoiding collisions 2021-06-17 16:21:01 +02:00
base-value.cpp Make base_value/format test easier to understand 2021-05-31 17:28:35 +02:00
config-apply.cpp Tests: config_apply/gettargetservices_*: use BOOST_CHECK_EQUAL_COLLECTIONS() 2023-12-18 16:01:31 +01:00
config-ops.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
icinga-checkable-fixture.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
icinga-checkable-flapping.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
icinga-checkresult.cpp Checkable: Add test for state notifications after a suppression ends 2022-03-03 14:25:23 +01:00
icinga-dependencies.cpp Repair unit tests 2023-02-21 17:49:26 +01:00
icinga-legacytimeperiod.cpp Timeperiods: fix off by one when calculating n-th last weekday of the month 2024-08-07 12:06:05 +02:00
icinga-macros.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
icinga-notification.cpp Notification#BeginExecuteNotification(): on recovery clear last_notified_state_per_user 2023-12-13 13:21:22 +01:00
icinga-perfdata.cpp Fix missing values in PerfData normalization 2024-04-25 17:41:12 +02:00
icingaapplication-fixture.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
icingaapplication-fixture.hpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
livestatus-fixture.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
livestatus.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
methods-pluginnotificationtask.cpp PluginNotificationTask::ScriptFunc(): on Linux truncate output and comment 2023-12-19 12:21:03 +01:00
remote-configpackageutility.cpp De-couple package and stage name validation 2021-08-02 15:40:14 +02:00
remote-url.cpp Replace Copyright header with a short version, part I 2019-02-25 14:48:22 +01:00
test-runner.cpp Tests: _Exit() in main() 2019-07-23 12:14:06 +02:00