Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
Signed-off-by: Vatsal Parekh <vatsalparekh@outlook.com>
  • Loading branch information
vatsalparekh committed Apr 1, 2024
1 parent e8da5e2 commit 9d7db6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func validateCreateFields(newRole *v3.RoleTemplate, fldPath *field.Path) *field.

func validateContextValue(newRole *v3.RoleTemplate, fldPath *field.Path) *field.Error {
if newRole.Context != projectContext && newRole.ProjectCreatorDefault {
return field.Forbidden(fldPath.Child("context"), "RoleTemplate context must be Project when projectCreatorDefault=true")
return field.Forbidden(fldPath.Child("context"), "RoleTemplate context must be project when projectCreatorDefault=true")
}
if newRole.Administrative && newRole.Context != clusterContext {
return field.Forbidden(fldPath.Child("administrative"), "only cluster roles can be administrative")
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/roleTemplate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,5 +148,5 @@ func (m *IntegrationSuite) TestRoleTemplateWithProjectCreatorDefault() {

err = client.Create(ctx, invalidRoleTemplate.GetNamespace(), invalidRoleTemplate, nil, v1.CreateOptions{})
m.Assert().NotNil(err)
m.Assert().Contains(err.Error(), "RoleTemplate context must be Project when projectCreatorDefault=true")
m.Assert().Contains(err.Error(), "RoleTemplate context must be project when projectCreatorDefault=true")
}

0 comments on commit 9d7db6b

Please sign in to comment.