mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
DRA CEL: fix error checking in unit test
Not getting an expected error wasn't checked.
This commit is contained in:
parent
7995b6f182
commit
5e514f5fcb
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user