1 package testingutil 2 3 import corev1 "k8s.io/api/core/v1" 4 5 // CreateFakeContainer creates a container with the given containerName 6 func CreateFakeContainer(containerName string) corev1.Container { 7 return corev1.Container{ 8 Name: containerName, 9 } 10 } 11 12 // CreateFakeContainerWithVolumeMounts creates a container with the given containerName and volumeMounts 13 func CreateFakeContainerWithVolumeMounts(containerName string, volumeMounts []corev1.VolumeMount) corev1.Container { 14 container := CreateFakeContainer(containerName) 15 container.VolumeMounts = volumeMounts 16 return container 17 } 18