Skip to content

Commit

Permalink
Start adding code and validation for checking condition update
Browse files Browse the repository at this point in the history
  • Loading branch information
gnufied committed Jul 24, 2017
1 parent 9be3f8e commit 52f6d71
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/api/validation/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ func ValidatePersistentVolumeClaimStatusUpdate(newPvc, oldPvc *api.PersistentVol
return allErrs
}

func ValidatePersistentVolumeClaimStatus(pvc *api.PersistentVolumeClaim) field.ErrorList {

}

var supportedPortProtocols = sets.NewString(string(api.ProtocolTCP), string(api.ProtocolUDP))

func validateContainerPorts(ports []api.ContainerPort, fldPath *field.Path) field.ErrorList {
Expand Down
19 changes: 19 additions & 0 deletions pkg/api/validation/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,17 @@ func testVolumeClaim(name string, namespace string, spec api.PersistentVolumeCla
}
}

func testVolumeClaimWithStatus(
name, namespace string,
spec api.PersistentVolumeClaimSpec,
status api.PersistentVolumeClaimStatus) {
return &api.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
Spec: spec,
Status: status,
}
}

func testVolumeClaimStorageClass(name string, namespace string, annval string, spec api.PersistentVolumeClaimSpec) *api.PersistentVolumeClaim {
annotations := map[string]string{
v1.BetaStorageClassAnnotation: annval,
Expand Down Expand Up @@ -8841,6 +8852,14 @@ func TestValidateLimitRange(t *testing.T) {

}

func TestValidatePersistentVolumeClaimStatusCreate(t *testing.T) {

}

func TestValidatePersistentVolumeClaimStatusUpdate(t *testing.T) {

}

func TestValidateResourceQuota(t *testing.T) {
spec := api.ResourceQuotaSpec{
Hard: api.ResourceList{
Expand Down

0 comments on commit 52f6d71

Please sign in to comment.