validating certificate template subjectname fleet vars - #36377
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #36377 +/- ##
========================================
Coverage 65.99% 66.00%
========================================
Files 2136 2134 -2
Lines 182057 181875 -182
Branches 7594 7540 -54
========================================
- Hits 120155 120041 -114
+ Misses 50913 50840 -73
- Partials 10989 10994 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| func validateCertificateTemplateFleetVariables(subjectName string) error { | ||
| // reject any variable that doesn't use the FLEET_VAR_ prefix. | ||
| re := regexp.MustCompile(`\$(?:\{)?([A-Za-z_][A-Za-z0-9_]*)\}?`) |
There was a problem hiding this comment.
I might be missing something here, but isn't a similar pattern matching logic already implemented into variables.Find(...)? Why is this required?
There was a problem hiding this comment.
Oh! I did not realize variables.Find already did this! Great! thank you.
juan-fdz-hawa
left a comment
There was a problem hiding this comment.
Failed tests seem not to be related to the PR
Related issue: Resolves #36289
Testing