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

Function TestRCValidPodImages

pkg/entity/replicationcontroller_test.go:56–73  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

54}
55
56func TestRCValidPodImages(t *testing.T) {
57 selector := map[string]string{
58 "service": "hotline",
59 }
60
61 pod := testCreateKubePodSourcegraph("sourcegraph")
62 meta := kube.ObjectMeta{
63 Name: "sourcegraph-rc",
64 }
65 kubeRC := testNewKubeRC(meta, selector, pod)
66 kubeRC.Spec.Template.Labels = selector
67
68 rc, err := NewReplicationController(kubeRC, kube.ObjectMeta{}, "valid-rc")
69 assert.NoError(t, err)
70
71 images := rc.Images()
72 assert.Len(t, images, 2, "RC should have 2 images")
73}
74
75func TestRCValidPodDeployment(t *testing.T) {
76 selector := map[string]string{

Callers

nothing calls this directly

Calls 5

ImagesMethod · 0.95
testNewKubeRCFunction · 0.85
NewReplicationControllerFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected