#include "zbxmockassert.h"
#include "zbxcacheconfig.h"
#include "dbconfig_maintenance_test.h"
static zbx_timeperiod_type_t get_period_type(const char *path)
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)
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");