Skip to content

Commit

Permalink
Merge pull request #244 from openshift-cherrypick-robot/cherry-pick-2…
Browse files Browse the repository at this point in the history
…43-to-18.0-fr1

[18.0-fr1] [OSPRH-11191] Remove dereference for nil pointer
  • Loading branch information
openshift-merge-bot[bot] authored Nov 14, 2024
2 parents 026395b + 99c0643 commit 4d00f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/ansibletest/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func GetVolumes(
volumes = append(volumes, extraVol)
}

if len(instance.Spec.Workflow) > 0 && *instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts != nil {
if len(instance.Spec.Workflow) > 0 && instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts != nil {
for _, vol := range *instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts {
extraWorkflowVol := corev1.Volume{
Name: vol.Name,
Expand Down Expand Up @@ -204,7 +204,7 @@ func GetVolumeMounts(mountCerts bool, instance *testv1beta1.AnsibleTest, externa
volumeMounts = append(volumeMounts, extraConfigmapsMounts)
}

if len(instance.Spec.Workflow) > 0 && *instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts != nil {
if len(instance.Spec.Workflow) > 0 && instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts != nil {
for _, vol := range *instance.Spec.Workflow[externalWorkflowCounter].ExtraConfigmapsMounts {

extraConfigmapsMounts := corev1.VolumeMount{
Expand Down

0 comments on commit 4d00f64

Please sign in to comment.