pacemaker  2.1.9-49aab99839
Scalable High-Availability cluster resource manager
Macros
pcmk__evaluate_date_expression_test.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <glib.h>
#include <crm/common/xml.h>
#include <crm/common/rules_internal.h>
#include <crm/common/unittest_internal.h>
#include "crmcommon_private.h"
Include dependency graph for pcmk__evaluate_date_expression_test.c:

Go to the source code of this file.

Macros

#define EXPR_LT_VALID
 
#define EXPR_ID_MISSING
 
#define EXPR_OP_INVALID
 
#define EXPR_LT_MISSING_END
 
#define EXPR_LT_INVALID_END
 
#define EXPR_GT_MISSING_START
 
#define EXPR_GT_INVALID_START
 
#define EXPR_GT_VALID
 
#define EXPR_RANGE_MISSING
 
#define EXPR_RANGE_INVALID_START_INVALID_END
 
#define EXPR_RANGE_INVALID_START_ONLY
 
#define EXPR_RANGE_VALID_START_ONLY
 
#define EXPR_RANGE_INVALID_END_ONLY
 
#define EXPR_RANGE_VALID_END_ONLY
 
#define EXPR_RANGE_VALID_START_INVALID_END
 
#define EXPR_RANGE_INVALID_START_VALID_END
 
#define EXPR_RANGE_VALID_START_VALID_END
 
#define EXPR_RANGE_VALID_START_INVALID_DURATION
 
#define EXPR_RANGE_VALID_START_VALID_DURATION
 
#define EXPR_RANGE_VALID_START_DURATION_MISSING_ID
 
#define EXPR_SPEC_MISSING
 
#define EXPR_SPEC_INVALID
 
#define EXPR_SPEC_VALID
 
#define EXPR_SPEC_MISSING_ID
 

Macro Definition Documentation

◆ EXPR_GT_INVALID_START

#define EXPR_GT_INVALID_START
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_GT "' " \
PCMK_XA_START "='not-a-datetime' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_GT
Definition: options.h:158

Definition at line 181 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_GT_MISSING_START

#define EXPR_GT_MISSING_START
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_GT "' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_GT
Definition: options.h:158

Definition at line 168 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_GT_VALID

#define EXPR_GT_VALID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_GT "' " \
PCMK_XA_START "='2024-02-01 12:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_GT
Definition: options.h:158

Definition at line 195 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_ID_MISSING

#define EXPR_ID_MISSING
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_LT "' " \
PCMK_XA_END "='2024-02-01 15:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_LT
Definition: options.h:166

Definition at line 89 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_LT_INVALID_END

#define EXPR_LT_INVALID_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_LT "' " \
PCMK_XA_END "='not-a-datetime' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_LT
Definition: options.h:166

Definition at line 130 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_LT_MISSING_END

#define EXPR_LT_MISSING_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_LT "' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_LT
Definition: options.h:166

Definition at line 117 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_LT_VALID

#define EXPR_LT_VALID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_LT "' " \
PCMK_XA_END "='2024-02-01 15:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301
#define PCMK_VALUE_LT
Definition: options.h:166

Definition at line 61 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_OP_INVALID

#define EXPR_OP_INVALID
Value:
PCMK_XA_OPERATION "='not-a-choice' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 104 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_INVALID_END_ONLY

#define EXPR_RANGE_INVALID_END_ONLY
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_END "='not-a-date' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 303 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_INVALID_START_INVALID_END

#define EXPR_RANGE_INVALID_START_INVALID_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='not-a-date' " \
PCMK_XA_END "='not-a-date' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 245 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_INVALID_START_ONLY

#define EXPR_RANGE_INVALID_START_ONLY
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='not-a-date' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 260 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_INVALID_START_VALID_END

#define EXPR_RANGE_INVALID_START_VALID_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='not-a-date' " \
PCMK_XA_END "='2024-02-01 15:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 377 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_MISSING

#define EXPR_RANGE_MISSING
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 228 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_END_ONLY

#define EXPR_RANGE_VALID_END_ONLY
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_END "='2024-02-01 15:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 317 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_DURATION_MISSING_ID

#define EXPR_RANGE_VALID_START_DURATION_MISSING_ID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00'>" \
"<" PCMK_XE_DURATION " " PCMK_XA_ID "='d' " \
PCMK_XA_HOURS "='3' />" \
#define PCMK_XE_DURATION
Definition: xml_names.h:104
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 519 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_INVALID_DURATION

#define EXPR_RANGE_VALID_START_INVALID_DURATION
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00'>" \
"<" PCMK_XE_DURATION " " PCMK_XA_ID "='d' " \
PCMK_XA_HOURS "='not-a-number' />" \
#define PCMK_XE_DURATION
Definition: xml_names.h:104
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 446 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_INVALID_END

#define EXPR_RANGE_VALID_START_INVALID_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00' " \
PCMK_XA_END "='not-a-date' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 346 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_ONLY

#define EXPR_RANGE_VALID_START_ONLY
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 274 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_VALID_DURATION

#define EXPR_RANGE_VALID_START_VALID_DURATION
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00'>" \
"<" PCMK_XE_DURATION " " PCMK_XA_ID "='d' " \
PCMK_XA_HOURS "='3' />" \
#define PCMK_XE_DURATION
Definition: xml_names.h:104
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 479 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_RANGE_VALID_START_VALID_END

#define EXPR_RANGE_VALID_START_VALID_END
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_IN_RANGE "' " \
PCMK_XA_START "='2024-02-01 12:00:00' " \
PCMK_XA_END "='2024-02-01 15:00:00' />"
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_VALUE_IN_RANGE
Definition: options.h:162
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 408 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_SPEC_INVALID

#define EXPR_SPEC_INVALID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_DATE_SPEC "'>" \
"<" PCMK_XE_DATE_SPEC " " PCMK_XA_ID "='s' " \
PCMK_XA_MONTHS "='not-a-number'/>" \
#define PCMK_VALUE_DATE_SPEC
Definition: options.h:141
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XE_DATE_SPEC
Definition: xml_names.h:97
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 575 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_SPEC_MISSING

#define EXPR_SPEC_MISSING
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_DATE_SPEC "' />"
#define PCMK_VALUE_DATE_SPEC
Definition: options.h:141
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 562 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_SPEC_MISSING_ID

#define EXPR_SPEC_MISSING_ID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_DATE_SPEC "'>" \
PCMK_XA_MONTHS "='2'/>" \
#define PCMK_VALUE_DATE_SPEC
Definition: options.h:141
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XE_DATE_SPEC
Definition: xml_names.h:97
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 625 of file pcmk__evaluate_date_expression_test.c.

◆ EXPR_SPEC_VALID

#define EXPR_SPEC_VALID
Value:
PCMK_XA_OPERATION "='" PCMK_VALUE_DATE_SPEC "'>" \
"<" PCMK_XE_DATE_SPEC " " PCMK_XA_ID "='s' " \
PCMK_XA_MONTHS "='2'/>" \
#define PCMK_VALUE_DATE_SPEC
Definition: options.h:141
#define PCMK_XE_DATE_EXPRESSION
Definition: xml_names.h:96
#define PCMK_XE_DATE_SPEC
Definition: xml_names.h:97
#define PCMK_XA_ID
Definition: xml_names.h:301

Definition at line 592 of file pcmk__evaluate_date_expression_test.c.