(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func TestInputPod(t *testing.T) { |
| 18 | input := testTempFileInput(t) |
| 19 | defer os.RemoveAll(input.Path()) |
| 20 | |
| 21 | kubePod := testKubePod() |
| 22 | |
| 23 | podFile := fmt.Sprintf("test.%s.%s", PodExtension, testRandomExtension()) |
| 24 | podPath := path.Join(input.Path(), podFile) |
| 25 | testWriteYAMLToFile(t, podPath, kubePod) |
| 26 | |
| 27 | testClearTypeInfo(kubePod) |
| 28 | |
| 29 | objects := testWriteRandomObjects(t, input.Path(), 5) |
| 30 | |
| 31 | expectedPod, err := entity.NewPod(kubePod, kube.ObjectMeta{}, podPath) |
| 32 | assert.NoError(t, err) |
| 33 | expected, err := entity.NewApp([]entity.Entity{expectedPod}, kube.ObjectMeta{}, input.Path(), objects...) |
| 34 | assert.NoError(t, err) |
| 35 | |
| 36 | actual, err := input.Build() |
| 37 | assert.NoError(t, err, "should have built entity successfully") |
| 38 | |
| 39 | testCompareEntity(t, expected, actual) |
| 40 | } |
| 41 | |
| 42 | func TestInputRCAndPod(t *testing.T) { |
| 43 | input := testTempFileInput(t) |
nothing calls this directly
no test coverage detected