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

Function TestPodWithContainersKube

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

Source from the content-addressed store, hash-verified

78}
79
80func TestPodWithContainersKube(t *testing.T) {
81 pod, err := NewPod(testCreateKubePodSourcegraph("test"), kube.ObjectMeta{}, "with-containers")
82 assert.NoError(t, err, "valid pod")
83
84 // check internals
85 assert.Len(t, pod.containers, 2, "should have postgres and sourcegraph containers")
86
87 expected := testCreateKubePodSourcegraph("test")
88 expected.Namespace = kube.NamespaceDefault
89
90 actual, _, err := pod.data()
91 assert.NoError(t, err, "should generate kube")
92
93 assert.True(t, kube.Semantic.DeepEqual(expected, actual), "Expected: %+v, Actual: %+v", expected, actual)
94}
95
96func TestPodWithContainersDeployment(t *testing.T) {
97 kubePod := testCreateKubePodSourcegraph("deploy")

Callers

nothing calls this directly

Calls 4

dataMethod · 0.95
NewPodFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected