Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2020-03-26 11:41:47 +0300
committerAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2020-03-26 11:57:15 +0300
commit418217d83b1178b3092ef0d5220863ce58bc85cf (patch)
treef01e08ae1093bf03ec4cfb5823a223901fd6ad51 /tests/libs/zbxdbcache
parent5f73a8536a9c639ef1b30f6cca1eef0f968328ce (diff)
........S. [ZBX-9387] fixed incorrect maintenance calculations when DST changed to summer time
* commit '84a90067a2cdc7a003cde62e86e18fea5a3f1d95': ........S. [ZBX-9387] cpde review rework ........S. [ZBX-9387] removed unused brackets ........S. [ZBX-9387] removed unused brackets ........S. [ZBX-9387] function description improvement ........S. [ZBX-9387] minor refactoring of zbx_get_timezone_offset() ........S. [ZBX-9387] added Windows support for zbx_get_timezone_offset and made minor coding gudeline fixes ........S. [ZBX-9387] correction for one time check ........S. [ZBX-9387] corrections for impossible summer time ........S. [ZBX-9387] fixed incorrect maintenance calculations when DST changed ........S. [ZBX-9387] added test ........S. [ZBX-9387] fixed incorrect maintenance calculations when DST changed to summer time (cherry picked from commit 63183d60b494984eed948abde0f46cbdee6ed2f3) (cherry picked from commit 325fe17dabfa65f4d450d29905a6fba5e8c364ea)
Diffstat (limited to 'tests/libs/zbxdbcache')
-rw-r--r--tests/libs/zbxdbcache/Makefile.am9
-rw-r--r--tests/libs/zbxdbcache/dbconfig_maintenance_test.c6
-rw-r--r--tests/libs/zbxdbcache/dbconfig_maintenance_test.h2
-rw-r--r--tests/libs/zbxdbcache/dc_check_maintenance_period.c168
-rw-r--r--tests/libs/zbxdbcache/dc_check_maintenance_period.yaml1405
5 files changed, 1590 insertions, 0 deletions
diff --git a/tests/libs/zbxdbcache/Makefile.am b/tests/libs/zbxdbcache/Makefile.am
index 187c6a997e9..93d072db411 100644
--- a/tests/libs/zbxdbcache/Makefile.am
+++ b/tests/libs/zbxdbcache/Makefile.am
@@ -4,6 +4,7 @@ SERVER_tests = \
zbx_vc_add_values \
zbx_vc_get_value \
dc_maintenance_match_tags \
+ dc_check_maintenance_period \
is_item_processed_by_server \
dc_item_poller_type_update
endif
@@ -126,10 +127,18 @@ dc_maintenance_match_tags_CFLAGS = \
-I@top_srcdir@/src/libs/zbxdbcache \
-I@top_srcdir@/tests
+dc_check_maintenance_period_CFLAGS = \
+ -I@top_srcdir@/src/libs/zbxdbcache \
+ -I@top_srcdir@/tests
+
dc_maintenance_match_tags_SOURCES = dc_maintenance_match_tags.c
dc_maintenance_match_tags_LDADD = $(CACHE_LIBS) @SERVER_LIBS@
dc_maintenance_match_tags_LDFLAGS = @SERVER_LDFLAGS@
+dc_check_maintenance_period_SOURCES = dc_check_maintenance_period.c
+dc_check_maintenance_period_LDADD = $(CACHE_LIBS) @SERVER_LIBS@
+dc_check_maintenance_period_LDFLAGS = @SERVER_LDFLAGS@
+
is_item_processed_by_server_SOURCES = is_item_processed_by_server.c
is_item_processed_by_server_LDADD = $(CACHE_LIBS) @SERVER_LIBS@
is_item_processed_by_server_LDFLAGS = @SERVER_LDFLAGS@
diff --git a/tests/libs/zbxdbcache/dbconfig_maintenance_test.c b/tests/libs/zbxdbcache/dbconfig_maintenance_test.c
index 09485c60142..d01fcc75346 100644
--- a/tests/libs/zbxdbcache/dbconfig_maintenance_test.c
+++ b/tests/libs/zbxdbcache/dbconfig_maintenance_test.c
@@ -23,3 +23,9 @@ int dc_maintenance_match_tags_test(const zbx_dc_maintenance_t *maintenance, cons
{
return dc_maintenance_match_tags(maintenance, tags);
}
+
+int dc_check_maintenance_period_test(const zbx_dc_maintenance_t *maintenance,
+ const zbx_dc_maintenance_period_t *period, time_t now, time_t *running_since, time_t *running_until)
+{
+ return dc_check_maintenance_period(maintenance, period, now, running_since, running_until);
+}
diff --git a/tests/libs/zbxdbcache/dbconfig_maintenance_test.h b/tests/libs/zbxdbcache/dbconfig_maintenance_test.h
index cae7f58b16a..5c410dd9159 100644
--- a/tests/libs/zbxdbcache/dbconfig_maintenance_test.h
+++ b/tests/libs/zbxdbcache/dbconfig_maintenance_test.h
@@ -21,5 +21,7 @@
#define DBCONFIG_MAINTENANCE_TEST_H
int dc_maintenance_match_tags_test(const zbx_dc_maintenance_t *maintenance, const zbx_vector_ptr_t *tags);
+int dc_check_maintenance_period_test(const zbx_dc_maintenance_t *maintenance,
+ const zbx_dc_maintenance_period_t *period, time_t now, time_t *running_since, time_t *running_until);
#endif
diff --git a/tests/libs/zbxdbcache/dc_check_maintenance_period.c b/tests/libs/zbxdbcache/dc_check_maintenance_period.c
new file mode 100644
index 00000000000..007a99c4abb
--- /dev/null
+++ b/tests/libs/zbxdbcache/dc_check_maintenance_period.c
@@ -0,0 +1,168 @@
+/*
+** Zabbix
+** Copyright (C) 2001-2020 Zabbix SIA
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+**/
+
+#include "zbxmocktest.h"
+#include "zbxmockdata.h"
+#include "zbxmockassert.h"
+#include "zbxmockutil.h"
+
+#include "common.h"
+#include "mutexs.h"
+#include "zbxalgo.h"
+#include "dbcache.h"
+#include "log.h"
+
+#define ZBX_DBCONFIG_IMPL
+#include "dbconfig.h"
+#include "dbconfig_maintenance_test.h"
+
+static zbx_timeperiod_type_t get_period_type(const char *path)
+{
+ zbx_mock_error_t err;
+ const char *data;
+
+ data = zbx_mock_get_parameter_string(path);
+
+ if (0 == strcmp(data, "onetime"))
+ return TIMEPERIOD_TYPE_ONETIME;
+ if (0 == strcmp(data, "daily"))
+ return TIMEPERIOD_TYPE_DAILY;
+ if (0 == strcmp(data, "weekly"))
+ return TIMEPERIOD_TYPE_WEEKLY;
+ if (0 == strcmp(data, "monthly"))
+ return TIMEPERIOD_TYPE_MONTHLY;
+
+ return TIMEPERIOD_TYPE_ONETIME;
+}
+
+static void get_period(zbx_dc_maintenance_period_t *period)
+{
+ zbx_timespec_t ts;
+
+ period->type = get_period_type("in.period.type");
+ period->every = zbx_mock_get_parameter_uint64("in.period.every");
+ period->dayofweek = zbx_mock_get_parameter_uint64("in.period.dayofweek");
+ period->day = zbx_mock_get_parameter_uint64("in.period.day");
+ period->month = zbx_mock_get_parameter_uint64("in.period.month");
+ period->period = zbx_mock_get_parameter_uint64("in.period.period");
+ period->start_time = zbx_mock_get_parameter_uint64("in.period.start_time");
+
+ if (ZBX_MOCK_SUCCESS != zbx_strtime_to_timespec(zbx_mock_get_parameter_string("in.period.start_date"), &ts))
+ period->start_date = 0;
+ else
+ period->start_date = ts.sec;
+}
+
+static void get_maintenance(zbx_dc_maintenance_t *maintenance)
+{
+ zbx_timespec_t ts;
+
+ if (ZBX_MOCK_SUCCESS != zbx_strtime_to_timespec(zbx_mock_get_parameter_string("in.maintenance.active_since"),
+ &ts))
+ {
+ fail_msg("Invalid 'active_since' format");
+ }
+ maintenance->active_since = (int)ts.sec;
+
+ if (ZBX_MOCK_SUCCESS != zbx_strtime_to_timespec(zbx_mock_get_parameter_string("in.maintenance.active_until"),
+ &ts))
+ {
+ fail_msg("Invalid 'active_until' format");
+ }
+ maintenance->active_until = (int)ts.sec;
+}
+
+/******************************************************************************
+ * *
+ * Function: zbx_mock_test_entry *
+ * *
+ ******************************************************************************/
+void zbx_mock_test_entry(void **state)
+{
+ zbx_dc_maintenance_period_t period;
+ zbx_dc_maintenance_t maintenance;
+ int expected_ret, step;
+ int actual_rets[128];
+ time_t running_since, running_until;
+ zbx_timespec_t ts;
+ zbx_mock_handle_t times, returns, handle;
+ zbx_mock_error_t mock_err;
+ const char *now, *return_str;
+ char msg[4096];
+
+ ZBX_UNUSED(state);
+
+ if (0 != setenv("TZ", zbx_mock_get_parameter_string("in.timezone"), 1))
+ fail_msg("Cannot set 'TZ' environment variable: %s", zbx_strerror(errno));
+
+ tzset();
+
+ get_maintenance(&maintenance);
+ get_period(&period);
+
+ times = zbx_mock_get_parameter_handle("in.times");
+
+ for(step = 1; ZBX_MOCK_END_OF_VECTOR != (mock_err = (zbx_mock_vector_element(times, &handle))); step++)
+ {
+ if (ZBX_MOCK_SUCCESS != mock_err)
+ {
+ fail_msg("Cannot read 'times' element #%d: %s", step, zbx_mock_error_string(mock_err));
+ continue;
+ }
+
+ if (ZBX_MOCK_SUCCESS != (mock_err = zbx_mock_string(handle, &now)))
+ {
+ fail_msg("Cannot read 'times' element #%d value: %s", step, zbx_mock_error_string(mock_err));
+ continue;
+ }
+
+ if (ZBX_MOCK_SUCCESS != (mock_err = zbx_strtime_to_timespec(now, &ts)))
+ {
+ fail_msg("Cannot convert 'times' element #%d value to time: %s", step,
+ zbx_mock_error_string(mock_err));
+ continue;
+ }
+
+ actual_rets[step-1] = dc_check_maintenance_period_test(&maintenance, &period, ts.sec, &running_since,
+ &running_until);
+ }
+
+ step = 1;
+ returns = zbx_mock_get_parameter_handle("out.returns");
+
+ for(step = 1; ZBX_MOCK_END_OF_VECTOR != (mock_err = (zbx_mock_vector_element(returns, &handle))); step++)
+ {
+ if (ZBX_MOCK_SUCCESS != mock_err)
+ {
+ fail_msg("Cannot read 'returns' element #%d: %s", step, zbx_mock_error_string(mock_err));
+ continue;
+ }
+
+ if (ZBX_MOCK_SUCCESS != (mock_err = zbx_mock_string(handle, &return_str)))
+ {
+ fail_msg("Cannot read 'returns' element #%d value: %s", step, zbx_mock_error_string(mock_err));
+ continue;
+ }
+
+ expected_ret = zbx_mock_str_to_return_code(return_str);
+ zbx_snprintf(msg, sizeof(msg), "Invalid return code step %d", step);
+
+ zbx_mock_assert_int_eq("dc_check_maintenance_period return value", expected_ret, actual_rets[step-1]);
+ }
+}
diff --git a/tests/libs/zbxdbcache/dc_check_maintenance_period.yaml b/tests/libs/zbxdbcache/dc_check_maintenance_period.yaml
new file mode 100644
index 00000000000..07a5e85ff2b
--- /dev/null
+++ b/tests/libs/zbxdbcache/dc_check_maintenance_period.yaml
@@ -0,0 +1,1405 @@
+---
+test case: Period before DST change to summer (0)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 32 #sat
+ day: 1
+ start_time: 0 #00:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-03-06 23:59:00 -06:00 #fri
+ - 2020-03-07 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Period during DST change to summer (1)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00 #sun
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long period during DST change to summer (2)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 32 #sat
+ day: 1
+ start_time: 82800 #23:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-03-07 22:00:00 -06:00 #sat
+ - 2020-03-07 22:59:00 -06:00
+ - 2020-03-07 23:00:00 -06:00
+ - 2020-03-09 00:59:00 -05:00
+ - 2020-03-09 01:00:00 -05:00
+ - 2020-03-09 02:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Period finishes during DST change to summer (3)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00 #sun
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Period finishes 1m after DST change to summer (4)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 3660 #1h 1m
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00 #sun
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:01:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Period starts during DST change to summer (5)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 10800 #03:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 01:00:00 -06:00 #sun
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Period cannot be applied during DST change to summer (6)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 7200 #02:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-01 01:59:00 -06:00 #sun
+ - 2020-03-01 02:00:00 -06:00
+ - 2020-03-01 02:59:00 -06:00
+ - 2020-03-01 03:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00 #sun
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-15 01:59:00 -05:00 #sun
+ - 2020-03-15 02:00:00 -05:00
+ - 2020-03-15 02:59:00 -05:00
+ - 2020-03-15 03:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+---
+test case: Daily period during DST change to summer (7)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Daily period finishes during DST change to summer (8)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Daily period starts during DST change to summer (9)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 10800 #03:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Monthly period during DST change to summer (10)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 4 #march
+ dayofweek: 0
+ day: 8
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Monthly period finishes during DST change to summer (11)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 4 #march
+ dayofweek: 0
+ day: 8
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Monthly period starts during DST change to summer (12)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 4 #march
+ dayofweek: 0
+ day: 8
+ start_time: 10800 #03:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Maintenance activity limited during DST change to summer (13)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-03-08 01:00:00 -06:00
+ active_until: 2020-03-08 04:00:00 -05:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 0 #00:00
+ period: 14400 #4h
+ start_date: 0
+ times:
+ - 2020-03-07 23:59:00 -06:00 #sat
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 04:59:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Maintenance activity limited during DST change to summer (14)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-03-08 00:00:00 -06:00
+ active_until: 2020-03-08 04:00:00 -05:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 0 #00:00
+ period: 14400 #4h
+ start_date: 0
+ times:
+ - 2020-03-07 23:59:00 -06:00 #sat
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 04:59:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Period before DST change to winter (15)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 32 #sat
+ day: 1
+ start_time: 0 #00:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-10-30 23:59:00 -05:00 #fri
+ - 2020-10-31 00:00:00 -05:00
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Period during DST change to winter (16)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-11-01 00:00:00 -05:00 #sun
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long period during DST change to winter (17)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 32 #sat
+ day: 1
+ start_time: 82800 #23:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-10-31 22:00:00 -05:00 #sat
+ - 2020-10-31 22:59:00 -05:00
+ - 2020-10-31 23:00:00 -06:00
+ - 2020-11-01 22:59:00 -06:00
+ - 2020-11-01 23:00:00 -06:00
+ - 2020-11-02 00:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Period finishes during DST change to winter (18)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00 #sun
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Period finishes 1m after DST change to winter (19)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 3660 #1h 1m
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00 #sun
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:01:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Period starts after DST change to winter (20)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 7200 #02:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 01:59:00 -05:00 #sun
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+ - 2020-11-01 03:59:00 -06:00
+ - 2020-11-01 04:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Daily period during DST change to winter (21)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Daily period finishes during DST change to winter (22)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Daily period starts after DST change to winter (23)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 7200 #02:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+---
+test case: Monthly period during DST change to winter (24)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 1024 #november
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Monthly period finishes during DST change to winter (25)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 1024 #november
+ dayofweek: 0
+ day: 1
+ start_time: 3600 #01:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Monthly period starts after DST change to winter (26)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: monthly
+ every: 1
+ month: 1024 #november
+ dayofweek: 0
+ day: 1
+ start_time: 7200 #02:00
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+---
+test case: Maintenance activity limited during DST change to winter (27)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-11-01 01:00:00 -05:00
+ active_until: 2020-11-01 02:00:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 0 #00:00
+ period: 14400 #4h
+ start_date: 0
+ times:
+ - 2020-10-31 23:59:00 -05:00 #sat
+ - 2020-11-01 00:00:00 -05:00
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Maintenance activity limited during DST change to winter (28)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-11-01 00:00:00 -05:00
+ active_until: 2020-11-01 02:00:00 -06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 0 #00:00
+ period: 14400 #4h
+ start_date: 0
+ times:
+ - 2020-10-31 23:59:00 -05:00 #sat
+ - 2020-11-01 00:00:00 -05:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+ - 2020-11-01 03:59:00 -06:00
+ - 2020-11-01 04:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: One time period during DST change to summer (29)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 7200 #2h
+ start_date: 2020-03-08 01:00:00 -06:00
+ times:
+ - 2020-03-08 00:00:00 -06:00
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: One time period finishes during DST change to summer (30)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 3600 #1h
+ start_date: 2020-03-08 01:00:00 -06:00
+ times:
+ - 2020-03-08 00:59:00 -06:00
+ - 2020-03-08 01:00:00 -06:00
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: One time period starts during DST change to summer (31)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 3600 #1h
+ start_date: 2020-03-08 03:00:00 -05:00
+ times:
+ - 2020-03-08 01:59:00 -06:00
+ - 2020-03-08 03:00:00 -05:00
+ - 2020-03-08 03:59:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+ - 2020-03-08 04:59:00 -05:00
+ - 2020-03-08 05:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: One time period during DST change to winter (32)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 7200 #2h
+ start_date: 2020-11-01 01:00:00 -05:00
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: One time period finishes during DST change to winter (33)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 3600 #1h
+ start_date: 2020-11-01 01:00:00 -05:00
+ times:
+ - 2020-11-01 00:59:00 -05:00
+ - 2020-11-01 01:00:00 -05:00
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: One time period starts after DST change to winter (34)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: onetime
+ every: 1
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 0
+ period: 3600 #1h
+ start_date: 2020-11-01 02:00:00 -06:00
+ times:
+ - 2020-11-01 01:59:00 -05:00
+ - 2020-11-01 01:00:00 -06:00
+ - 2020-11-01 01:59:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+ - 2020-11-01 02:59:00 -06:00
+ - 2020-11-01 03:00:00 -06:00
+ - 2020-11-01 04:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long daily period during DST change to winter (35)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 2
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 82800 #23:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-10-31 22:59:00 -05:00
+ - 2020-10-31 23:00:00 -05:00
+ - 2020-11-01 22:59:00 -06:00
+ - 2020-11-01 23:00:00 -06:00
+ - 2020-11-02 00:00:00 -06:00
+ - 2020-11-02 01:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Long daily period during DST change to summer (36)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 -06:00
+ active_until: 2020-12-31 23:59:00 -06:00
+ period:
+ type: daily
+ every: 2
+ month: 0
+ dayofweek: 0
+ day: 1
+ start_time: 82800 #23:00
+ period: 90000 #1d 1h
+ start_date: 0
+ times:
+ - 2020-03-07 22:59:00 -06:00
+ - 2020-03-07 23:00:00 -06:00
+ - 2020-03-09 00:59:00 -05:00
+ - 2020-03-09 01:00:00 -05:00
+ - 2020-03-09 02:00:00 -05:00
+ - 2020-03-09 03:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+ - FAIL
+---
+test case: Long daily period during exotic DST change to summer (37)
+in:
+ timezone: :Australia/Lord_Howe
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +11:00
+ active_until: 2020-12-31 23:59:00 +11:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-04-05 00:00:00 +11:00 #sun
+ - 2020-04-05 00:59:00 +11:00
+ - 2020-04-05 01:00:00 +11:00
+ - 2020-04-05 02:29:00 +10:30
+ - 2020-04-05 02:30:00 +10:30
+ - 2020-04-05 03:00:00 +10:30
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long daily period during exotic DST change to winter (38)
+in:
+ timezone: :Australia/Lord_Howe
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +11:00
+ active_until: 2020-12-31 23:59:00 +11:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 3600 #01:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-10-04 00:00:00 +10:30 #sun
+ - 2020-10-04 00:59:00 +10:30
+ - 2020-10-04 01:00:00 +10:30
+ - 2020-10-04 03:29:00 +11:00
+ - 2020-10-04 03:30:00 +11:00
+ - 2020-10-04 04:00:00 +11:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long weekly period during exotic DST change to summer (39)
+in:
+ timezone: :Antarctica/Troll
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +00:00
+ active_until: 2020-12-31 23:59:00 +00:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 0 #00:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-03-14 23:00:00 +00:00 #sat
+ - 2020-03-14 23:59:00 +00:00
+ - 2020-03-15 00:00:00 +00:00
+ - 2020-03-15 03:59:00 +02:00
+ - 2020-03-15 04:00:00 +02:00
+ - 2020-03-15 05:00:00 +02:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Long weekly period during exotic DST change to winter (40)
+in:
+ timezone: :Antarctica/Troll
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +00:00
+ active_until: 2020-12-31 23:59:00 +00:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 7200 #02:00
+ period: 7200 #2h
+ start_date: 0
+ times:
+ - 2020-10-25 01:00:00 +02:00 #sun
+ - 2020-10-25 01:59:00 +02:00
+ - 2020-10-25 02:00:00 +02:00
+ - 2020-10-25 01:59:00 +00:00
+ - 2020-10-25 02:00:00 +00:00
+ - 2020-10-25 03:00:00 +00:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Short period during DST change to summer (41)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +00:00
+ active_until: 2020-12-31 23:59:00 +00:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 6600 #01:50
+ period: 1200 #20m
+ start_date: 0
+ times:
+ - 2020-03-08 01:00:00 -06:00 #sun
+ - 2020-03-08 01:49:00 -06:00
+ - 2020-03-08 01:50:00 -06:00
+ - 2020-03-08 03:09:00 -05:00
+ - 2020-03-08 03:10:00 -05:00
+ - 2020-03-08 04:00:00 -05:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Short period during DST change to winter (42)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-01-01 00:00:00 +00:00
+ active_until: 2020-12-31 23:59:00 +00:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #sun
+ day: 1
+ start_time: 6600 #01:50
+ period: 1200 #20m
+ start_date: 0
+ times:
+ - 2020-11-01 01:00:00 -05:00 #sun
+ - 2020-11-01 01:49:00 -05:00
+ - 2020-11-01 01:50:00 -05:00
+ - 2020-11-01 01:09:00 -06:00
+ - 2020-11-01 01:10:00 -06:00
+ - 2020-11-01 02:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - SUCCEED
+ - SUCCEED
+ - FAIL
+ - FAIL
+---
+test case: Maintenance activity limited out of DST (43)
+in:
+ timezone: :America/Chicago
+ maintenance:
+ active_since: 2020-02-12 13:00:00 +06:00
+ active_until: 2020-02-12 23:59:00 +06:00
+ period:
+ type: weekly
+ every: 1
+ month: 0
+ dayofweek: 64 #wed
+ day: 1
+ start_time: 6600 #12:50
+ period: 3600 #1h
+ start_date: 0
+ times:
+ - 2020-02-12 12:30:00 -06:00 #wed
+ - 2020-02-12 12:50:00 -06:00
+ - 2020-02-12 13:00:00 -06:00
+ - 2020-02-12 13:59:00 -06:00
+ - 2020-02-12 14:00:00 -06:00
+out:
+ returns:
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+ - FAIL
+...