mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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())
|
t.Fatalf("%v", issues.Errors())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Typecheck expression
|
||||||
|
_, err = cel.AstToCheckedExpr(compiled)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
prog, err := env.Program(compiled)
|
prog, err := env.Program(compiled)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("%v", err)
|
t.Fatalf("%v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user