mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Correct cost estimation check.
This commit is contained in:
parent
120744bf44
commit
6f66ed06f2
@ -201,7 +201,7 @@ var _ = SIGDescribe("CustomResourceValidationRules [Privileged:ClusterAdmin][Alp
|
|||||||
}],
|
}],
|
||||||
"properties": {
|
"properties": {
|
||||||
"x": {
|
"x": {
|
||||||
"type": "list",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ var _ = SIGDescribe("CustomResourceValidationRules [Privileged:ClusterAdmin][Alp
|
|||||||
crd := fixtures.NewRandomNameV1CustomResourceDefinitionWithSchema(v1.NamespaceScoped, schemaWithExpensiveRule, false)
|
crd := fixtures.NewRandomNameV1CustomResourceDefinitionWithSchema(v1.NamespaceScoped, schemaWithExpensiveRule, false)
|
||||||
_, err := fixtures.CreateNewV1CustomResourceDefinitionWatchUnsafe(crd, apiExtensionClient)
|
_, err := fixtures.CreateNewV1CustomResourceDefinitionWatchUnsafe(crd, apiExtensionClient)
|
||||||
framework.ExpectError(err, "creating a CustomResourceDefinition with a validation rule that exceeds the cost limit")
|
framework.ExpectError(err, "creating a CustomResourceDefinition with a validation rule that exceeds the cost limit")
|
||||||
expectedErrMsg := "syntax error"
|
expectedErrMsg := "exceeded budget"
|
||||||
if !strings.Contains(err.Error(), expectedErrMsg) {
|
if !strings.Contains(err.Error(), expectedErrMsg) {
|
||||||
framework.Failf("expected error message to contain %q, got %q", expectedErrMsg, err.Error())
|
framework.Failf("expected error message to contain %q, got %q", expectedErrMsg, err.Error())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user