Skip to content
Snippets Groups Projects

[renovate] Update module github.com/bufbuild/protovalidate-go to v0.8.2

Merged Ghost User requested to merge renovate/github.com-bufbuild-protovalidate-go-0.x into master
3 files
+ 21
14
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -84,10 +84,20 @@ func TestRole_CreateRoles(t *testing.T) {
@@ -84,10 +84,20 @@ func TestRole_CreateRoles(t *testing.T) {
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{
validationErrors: []*validate.Violation{
{
{
FieldPath: stringToPointer("roles[0].name"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("roles"),
 
},
 
{
 
FieldName: stringToPointer("name"),
 
},
 
},
 
},
ConstraintId: stringToPointer("string.min_len"),
ConstraintId: stringToPointer("string.min_len"),
Message: stringToPointer("value length must be at least 3 characters"),
Message: stringToPointer("value length must be at least 3 characters"),
}},
},
 
},
},
},
{
{
name: "role with too short description should fail",
name: "role with too short description should fail",
@@ -105,7 +115,16 @@ func TestRole_CreateRoles(t *testing.T) {
@@ -105,7 +115,16 @@ func TestRole_CreateRoles(t *testing.T) {
want: &apb.CreateRolesResponse{},
want: &apb.CreateRolesResponse{},
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{{
validationErrors: []*validate.Violation{{
FieldPath: stringToPointer("roles[0].description"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("roles"),
 
},
 
{
 
FieldName: stringToPointer("description"),
 
},
 
},
 
},
ConstraintId: stringToPointer("string.min_len"),
ConstraintId: stringToPointer("string.min_len"),
Message: stringToPointer("value length must be at least 3 characters"),
Message: stringToPointer("value length must be at least 3 characters"),
}},
}},
@@ -181,7 +200,13 @@ func TestRole_GetRole(t *testing.T) {
@@ -181,7 +200,13 @@ func TestRole_GetRole(t *testing.T) {
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{
validationErrors: []*validate.Violation{
{
{
FieldPath: stringToPointer("role_name"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("role_name"),
 
},
 
},
 
},
ConstraintId: stringToPointer("required"),
ConstraintId: stringToPointer("required"),
Message: stringToPointer("value is required"),
Message: stringToPointer("value is required"),
},
},
@@ -355,7 +380,16 @@ func TestRole_UpdateRoles(t *testing.T) {
@@ -355,7 +380,16 @@ func TestRole_UpdateRoles(t *testing.T) {
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{
validationErrors: []*validate.Violation{
{
{
FieldPath: stringToPointer("roles[0].name"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("roles"),
 
},
 
{
 
FieldName: stringToPointer("name"),
 
},
 
},
 
},
ConstraintId: stringToPointer("string.min_len"),
ConstraintId: stringToPointer("string.min_len"),
Message: stringToPointer("value length must be at least 3 characters"),
Message: stringToPointer("value length must be at least 3 characters"),
},
},
@@ -379,7 +413,16 @@ func TestRole_UpdateRoles(t *testing.T) {
@@ -379,7 +413,16 @@ func TestRole_UpdateRoles(t *testing.T) {
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{
validationErrors: []*validate.Violation{
{
{
FieldPath: stringToPointer("roles[0].description"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("roles"),
 
},
 
{
 
FieldName: stringToPointer("description"),
 
},
 
},
 
},
ConstraintId: stringToPointer("string.min_len"),
ConstraintId: stringToPointer("string.min_len"),
Message: stringToPointer("value length must be at least 3 characters"),
Message: stringToPointer("value length must be at least 3 characters"),
},
},
@@ -456,12 +499,24 @@ func TestRole_DeletePermissionsForRole(t *testing.T) {
@@ -456,12 +499,24 @@ func TestRole_DeletePermissionsForRole(t *testing.T) {
wantErr: true,
wantErr: true,
validationErrors: []*validate.Violation{
validationErrors: []*validate.Violation{
{
{
FieldPath: stringToPointer("role_name"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("role_name"),
 
},
 
},
 
},
ConstraintId: stringToPointer("required"),
ConstraintId: stringToPointer("required"),
Message: stringToPointer("value is required"),
Message: stringToPointer("value is required"),
},
},
{
{
FieldPath: stringToPointer("permissions_to_delete"),
Field: &validate.FieldPath{
 
Elements: []*validate.FieldPathElement{
 
{
 
FieldName: stringToPointer("permissions_to_delete"),
 
},
 
},
 
},
ConstraintId: stringToPointer("required"),
ConstraintId: stringToPointer("required"),
Message: stringToPointer("value is required"),
Message: stringToPointer("value is required"),
},
},
Loading