(t *testing.T)
| 78 | } |
| 79 | |
| 80 | func 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 | |
| 96 | func TestPodWithContainersDeployment(t *testing.T) { |
| 97 | kubePod := testCreateKubePodSourcegraph("deploy") |
nothing calls this directly
no test coverage detected