diff --git a/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go index 33ed7724e98..ee697a0495b 100644 --- a/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go +++ b/staging/src/k8s.io/dynamic-resource-allocation/cel/compile_test.go @@ -248,6 +248,9 @@ device.attributes["dra.example.com"]["version"].isGreaterThan(semver("0.0.1")) } return } + if scenario.expectCompileError != "" { + t.Fatalf("expected compile error %q, got none", scenario.expectCompileError) + } if expect, actual := scenario.expectCost, result.MaxCost; expect != actual { t.Errorf("expected CEL cost %d, got %d instead", expect, actual) } @@ -262,6 +265,9 @@ device.attributes["dra.example.com"]["version"].isGreaterThan(semver("0.0.1")) } return } + if scenario.expectMatchError != "" { + t.Fatalf("expected match error %q, got none", scenario.expectMatchError) + } if match != scenario.expectMatch { t.Fatalf("expected result %v, got %v", scenario.expectMatch, match) }