Skip to content

Commit 12ba2da

Browse files
committed
time_based_vars.cf: fixed test assumptions
It assumed that it would contain the 24th hour instead of the 0th. Now both are accepted. Also it appears the regex for `hr` and `hr_2` was mixed up. ``` R: FAIL: "default:sys.time_based_gmt_hr => GMT_Hr00" did not match "^GMT_Hr([1-9]|1[0-9]|2[0-4])$" R: FAIL: "default:sys.time_based_gmt_hr_2 => GMT_Hr0" did not match "^GMT_Hr(0[1-9]|1[0-9]|2[0-4])$" R: FAIL: "default:sys.time_based_gmt_hr_qoh => GMT_Hr00_Q1" did not match "^GMT_Hr(0[1-9]|1[0-9]|2[0-4])_Q[1-4]$" ``` Ticket: ENT-13540 Signed-off-by: Lars Erik Wik <[email protected]>
1 parent a7d05a8 commit 12ba2da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/acceptance/01_vars/01_basic/time_based_vars.cf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ bundle agent test
3737
"variables" data => '{
3838
"dom": "^Day([1-9]|[1-2][0-9]|3[0-1])$",
3939
"dow": "^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$",
40-
"hr": "^Hr([1-9]|1[0-9]|2[0-4])$",
41-
"hr_2": "^Hr(0[1-9]|1[0-9]|2[0-4])$",
42-
"hr_qoh": "^Hr(0[1-9]|1[0-9]|2[0-4])_Q[1-4]$",
40+
"hr": "^Hr(0[0-9]|1[0-9]|2[0-4])$",
41+
"hr_2": "^Hr([0-9]|1[0-9]|2[0-4])$",
42+
"hr_qoh": "^Hr(0[0-9]|1[0-9]|2[0-4])_Q[1-4]$",
4343
"lcycle": "^Lcycle_[0-3]$",
4444
"min": "^Min([0-5][0-9]|60)$",
4545
"min_span_5": "^Min(00_05|05_10|10_15|15_20|20_25|25_30|30_35|35_40|40_45|45_50|50_55|55_00)$",
@@ -50,9 +50,9 @@ bundle agent test
5050

5151
"gmt_dom": "^GMT_Day([1-9]|[1-2][0-9]|3[0-1])$",
5252
"gmt_dow": "^GMT_(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)$",
53-
"gmt_hr": "^GMT_Hr([1-9]|1[0-9]|2[0-4])$",
54-
"gmt_hr_2": "^GMT_Hr(0[1-9]|1[0-9]|2[0-4])$",
55-
"gmt_hr_qoh": "^GMT_Hr(0[1-9]|1[0-9]|2[0-4])_Q[1-4]$",
53+
"gmt_hr": "^GMT_Hr(0[0-9]|1[0-9]|2[0-4])$",
54+
"gmt_hr_2": "^GMT_Hr([0-9]|1[0-9]|2[0-4])$",
55+
"gmt_hr_qoh": "^GMT_Hr(0[0-9]|1[0-9]|2[0-4])_Q[1-4]$",
5656
"gmt_lcycle": "^GMT_Lcycle_[0-3]$",
5757
"gmt_min": "^GMT_Min([0-5][0-9]|60)$",
5858
"gmt_min_span_5": "^GMT_Min(00_05|05_10|10_15|15_20|20_25|25_30|30_35|35_40|40_45|45_50|50_55|55_00)$",

0 commit comments

Comments
 (0)