Repository: kubernetes/kubernetes
File: test/e2e/common/node/image_volume.go (Go)

Code before:
						Name:         containerName,
						Image:        imageutils.GetE2EImage(imageutils.BusyBox),
						Command:      []string{"/bin/sh", "-c", "while true; do echo test; sleep 1; done"},
						VolumeMounts: volumeMounts,
					},
				},
				Volumes: volumes,
			},
		}

		ginkgo.By(fmt.Sprintf("Creating a pod (%s/%s)", f.Namespace.Name, podName))
		e2epod.NewPodClient(f).Create(ctx, pod)
	}

	verifyFileContents := func(podName, volumePath string) {
		ginkgo.By(fmt.Sprintf("Verifying the volume mount contents for path: %s", volumePath))

		firstFileContents := e2epod.ExecCommandInContainer(f, podName, containerName, "/bin/cat", filepath.Join(volumePath, "data.json"))
		gomega.Expect(firstFileContents).To(gomega.ContainSubstring("kitten.jpg"))

		secondFileContents := e2epod.ExecCommandInContainer(f, podName, containerName, "/bin/cat", filepath.Join(volumePath, "etc", "os-release"))
		gomega.Expect(secondFileContents).To(gomega.ContainSubstring("Alpine Linux"))
	}

	/*
		Release: v1.35
		Testname: Image Volume
		Description: Create a Pod using an image volume and a pull policy of Always.
		This test verifies that the image volume functionality is available by default and works as intended.
	*/
	framework.It("should succeed with pod and pull policy of Always [MinimumKubeletVersion:1.35]", func(ctx context.Context) {
		var selinuxOptions *v1.SELinuxOptions
		if selinux.GetEnabled() {
			selinuxOptions = &v1.SELinuxOptions{
				User:  defaultSELinuxUser,
				Role:  defaultSELinuxRole,
				Type:  defaultSELinuxType,
				Level: defaultSELinuxLevel,
			}
			ginkgo.By(fmt.Sprintf("Using SELinux on pod: %v", selinuxOptions))
		}

		createPod(ctx,
			podName,
			"",
			[]v1.Volume{{Name: volumeName, VolumeSource: v1.VolumeSource{Image: &v1.ImageVolumeSource{Reference: volumeImage, PullPolicy: v1.PullAlways}}}},
			[]v1.VolumeMount{{Name: volumeName, MountPath: volumePathPrefix}},
			selinuxOptions,
		)

		ginkgo.By(fmt.Sprintf("Waiting for the pod (%s/%s) to be running", f.Namespace.Name, podName))

Review comment (suggestion):
```suggestion
		Release: v1.36
```
We are now in the v1.36 cycle :)



Code after:
						Name:         containerName,
						Image:        imageutils.GetE2EImage(imageutils.BusyBox),
						Command:      []string{"/bin/sh", "-c", "while true; do echo test; sleep 1; done"},
						VolumeMounts: volumeMounts,
					},
				},
				Volumes: volumes,
			},
		}

		ginkgo.By(fmt.Sprintf("Creating a pod (%s/%s)", f.Namespace.Name, podName))
		e2epod.NewPodClient(f).Create(ctx, pod)
	}

	verifyFileContents := func(podName, volumePath string) {
		ginkgo.By(fmt.Sprintf("Verifying the volume mount contents for path: %s", volumePath))

		firstFileContents := e2epod.ExecCommandInContainer(f, podName, containerName, "/bin/cat", filepath.Join(volumePath, "data.json"))
		gomega.Expect(firstFileContents).To(gomega.ContainSubstring("kitten.jpg"))

		secondFileContents := e2epod.ExecCommandInContainer(f, podName, containerName, "/bin/cat", filepath.Join(volumePath, "etc", "os-release"))
		gomega.Expect(secondFileContents).To(gomega.ContainSubstring("Alpine Linux"))
	}

	/*
		Release: v1.36
		Testname: Image Volume
		Description: Create a Pod using an image volume and a pull policy of Always.
		This test verifies that the image volume functionality is available by default and works as intended.
	*/
	framework.It("should succeed with pod and pull policy of Always [MinimumKubeletVersion:1.35]", func(ctx context.Context) {
		var selinuxOptions *v1.SELinuxOptions
		if selinux.GetEnabled() {
			selinuxOptions = &v1.SELinuxOptions{
				User:  defaultSELinuxUser,
				Role:  defaultSELinuxRole,
				Type:  defaultSELinuxType,
				Level: defaultSELinuxLevel,
			}
			ginkgo.By(fmt.Sprintf("Using SELinux on pod: %v", selinuxOptions))
		}

		createPod(ctx,
			podName,
			"",
			[]v1.Volume{{Name: volumeName, VolumeSource: v1.VolumeSource{Image: &v1.ImageVolumeSource{Reference: volumeImage, PullPolicy: v1.PullAlways}}}},
			[]v1.VolumeMount{{Name: volumeName, MountPath: volumePathPrefix}},
			selinuxOptions,
		)

		ginkgo.By(fmt.Sprintf("Waiting for the pod (%s/%s) to be running", f.Namespace.Name, podName))