mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
test: typecheck cel test cases
This commit is contained in:
parent
15ee05afd4
commit
11a6edfc88
@ -82,6 +82,12 @@ func testQuantity(t *testing.T, expr string, expectResult ref.Val, expectRuntime
|
||||
t.Fatalf("%v", issues.Errors())
|
||||
}
|
||||
|
||||
// Typecheck expression
|
||||
_, err = cel.AstToCheckedExpr(compiled)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
}
|
||||
|
||||
prog, err := env.Program(compiled)
|
||||
if err != nil {
|
||||
t.Fatalf("%v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user