MCPcopy
hub / github.com/redspread/spread / TestPodWithContainersImage

Function TestPodWithContainersImage

pkg/entity/pod_test.go:64–78  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestPodWithContainersImage(t *testing.T) {
65 pod, err := NewPod(testCreateKubePodSourcegraph("test"), kube.ObjectMeta{}, "has-containers")
66 assert.NoError(t, err, "valid pod")
67
68 images := pod.Images()
69 assert.Len(t, images, 2, "there should only be 2 images")
70
71 imageNames := []string{}
72 for _, image := range images {
73 imageNames = append(imageNames, image.KubeImage())
74 }
75
76 assert.Contains(t, imageNames, testKubeContainerPostgres.Image)
77 assert.Contains(t, imageNames, testKubeContainerSourcegraph.Image)
78}
79
80func TestPodWithContainersKube(t *testing.T) {
81 pod, err := NewPod(testCreateKubePodSourcegraph("test"), kube.ObjectMeta{}, "with-containers")

Callers

nothing calls this directly

Calls 5

ImagesMethod · 0.95
NewPodFunction · 0.85
KubeImageMethod · 0.80
LenMethod · 0.45

Tested by

no test coverage detected