mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 06:27:05 +00:00
Removes conflicting Quobyte tenant test error from API validation
This commit is contained in:
parent
da3daf2e8a
commit
a11e6a80a1
@ -904,8 +904,6 @@ func validateQuobyteVolumeSource(quobyte *core.QuobyteVolumeSource, fldPath *fie
|
|||||||
allErrs := field.ErrorList{}
|
allErrs := field.ErrorList{}
|
||||||
if len(quobyte.Registry) == 0 {
|
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"))
|
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 {
|
} 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"))
|
allErrs = append(allErrs, field.Required(fldPath.Child("tenant"), "must be a UUID and may not exceed a length of 64 characters"))
|
||||||
} else {
|
} else {
|
||||||
|
@ -3659,16 +3659,12 @@ func TestValidateVolumes(t *testing.T) {
|
|||||||
Name: "quobyte",
|
Name: "quobyte",
|
||||||
VolumeSource: core.VolumeSource{
|
VolumeSource: core.VolumeSource{
|
||||||
Quobyte: &core.QuobyteVolumeSource{
|
Quobyte: &core.QuobyteVolumeSource{
|
||||||
Registry: "registry:7861,reg2",
|
Registry: "registry:7861",
|
||||||
Volume: "/test",
|
Volume: "/test",
|
||||||
Tenant: "",
|
Tenant: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
errs: []verr{{
|
|
||||||
etype: field.ErrorTypeRequired,
|
|
||||||
field: "quobyte.tenant",
|
|
||||||
}},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "too long tenant quobyte",
|
name: "too long tenant quobyte",
|
||||||
@ -3676,7 +3672,7 @@ func TestValidateVolumes(t *testing.T) {
|
|||||||
Name: "quobyte",
|
Name: "quobyte",
|
||||||
VolumeSource: core.VolumeSource{
|
VolumeSource: core.VolumeSource{
|
||||||
Quobyte: &core.QuobyteVolumeSource{
|
Quobyte: &core.QuobyteVolumeSource{
|
||||||
Registry: "registry:7861,reg2",
|
Registry: "registry:7861",
|
||||||
Volume: "/test",
|
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.",
|
Tenant: "this is too long to be a valid uuid so this test has to fail on the maximum length validation of the tenant.",
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user