Skip to content

Commit

Permalink
fix(vol): fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jnarezo committed Sep 12, 2024
1 parent 0b64efe commit b88b3d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/instrumentation/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ func isInstrWithoutContainers(inst instrumentationWithContainers) int {
}

func instrVolume(volume corev1.Volume, name string, volumeSizeLimit *resource.Quantity) (corev1.Volume, error) {
if reflect.ValueOf(volume).IsValid() && volumeSizeLimit != nil {
if !reflect.ValueOf(volume).IsZero() && volumeSizeLimit != nil {
return volume, fmt.Errorf("both Volume and VolumeSizeLimit cannot be defined simultaneously")
} else if reflect.ValueOf(volume).IsValid() {
} else if !reflect.ValueOf(volume).IsZero() {
return volume, nil
}

Expand Down

0 comments on commit b88b3d0

Please sign in to comment.