Skip to content

ENT-13540: time_based_vars.cf: refactored acceptance test#5987

Merged
larsewi merged 2 commits into
cfengine:masterfrom
larsewi:time-based-vars
Dec 12, 2025
Merged

ENT-13540: time_based_vars.cf: refactored acceptance test#5987
larsewi merged 2 commits into
cfengine:masterfrom
larsewi:time-based-vars

Conversation

@larsewi

@larsewi larsewi commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

Refactored test to print debug information when test fails. This revealed why the test fails every now and then.

It assumed that it would contain the 24th hour instead of the 0th. Now both are accepted. It also 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 lars.erik.wik@northern.tech

Build Status

@larsewi larsewi marked this pull request as ready for review December 9, 2025 13:52

@craigcomstock craigcomstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so lovely. thank you. :)

@larsewi larsewi force-pushed the time-based-vars branch 3 times, most recently from 0609e16 to 12ba2da Compare December 11, 2025 09:11
Refactored test to print debug information when test fails. This will
hopefully reveal why the test fails every now and then.

Ticket: ENT-13540
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
It assumed that it would contain the 24th hour instead of the 0th. Now
both are accepted. It also 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 <lars.erik.wik@northern.tech>
@larsewi

larsewi commented Dec 11, 2025

Copy link
Copy Markdown
Contributor Author

Build Status

@larsewi larsewi merged commit 0024904 into cfengine:master Dec 12, 2025
47 of 50 checks passed
@larsewi larsewi deleted the time-based-vars branch April 27, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants