Skip to content

Commit

Permalink
Merge pull request kubernetes#80512 from casusbelli/bugfix_80332
Browse files Browse the repository at this point in the history
Removes conflicting Quobyte tenant test from API validation
  • Loading branch information
k8s-ci-robot authored Aug 17, 2019
2 parents 3b85eea + a11e6a8 commit 7a6e9fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 0 additions & 2 deletions pkg/apis/core/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,8 +904,6 @@ func validateQuobyteVolumeSource(quobyte *core.QuobyteVolumeSource, fldPath *fie
allErrs := field.ErrorList{}
if len(quobyte.Registry) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("registry"), "must be a host:port pair or multiple pairs separated by commas"))
} else if len(quobyte.Tenant) == 0 {
allErrs = append(allErrs, field.Required(fldPath.Child("tenant"), "must be a UUID provided by the configuration and may not be omitted "))
} else if len(quobyte.Tenant) >= 65 {
allErrs = append(allErrs, field.Required(fldPath.Child("tenant"), "must be a UUID and may not exceed a length of 64 characters"))
} else {
Expand Down
8 changes: 2 additions & 6 deletions pkg/apis/core/validation/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3659,24 +3659,20 @@ func TestValidateVolumes(t *testing.T) {
Name: "quobyte",
VolumeSource: core.VolumeSource{
Quobyte: &core.QuobyteVolumeSource{
Registry: "registry:7861,reg2",
Registry: "registry:7861",
Volume: "/test",
Tenant: "",
},
},
},
errs: []verr{{
etype: field.ErrorTypeRequired,
field: "quobyte.tenant",
}},
},
{
name: "too long tenant quobyte",
vol: core.Volume{
Name: "quobyte",
VolumeSource: core.VolumeSource{
Quobyte: &core.QuobyteVolumeSource{
Registry: "registry:7861,reg2",
Registry: "registry:7861",
Volume: "/test",
Tenant: "this is too long to be a valid uuid so this test has to fail on the maximum length validation of the tenant.",
},
Expand Down

0 comments on commit 7a6e9fd

Please sign in to comment.