mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 21:36:24 +00:00
Merge pull request #127375 from omerap12/issue_126311
Add test for CEL reserved symbols without double underscore
This commit is contained in:
commit
165da9ad0f
@ -19,6 +19,7 @@ package cel
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
fuzz "github.com/google/gofuzz"
|
||||
@ -204,3 +205,11 @@ func TestCanSkipRegex(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCELReservedSymbolsNoDoubleUnderscore(t *testing.T) {
|
||||
for symbol := range celReservedSymbols {
|
||||
if strings.Contains(symbol, "__") {
|
||||
t.Errorf("CEL reserved symbol '%s' contains '__', which is not allowed as it would interfere with escaping", symbol)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user