(t *testing.T)
| 118 | } |
| 119 | |
| 120 | func TestSourceEntitiesEmptyFile(t *testing.T) { |
| 121 | fs := testTempFileSource(t) |
| 122 | defer os.RemoveAll(string(fs)) |
| 123 | |
| 124 | entityFiles := []string{ |
| 125 | path.Join(string(fs), "dogan.rc.yml"), |
| 126 | path.Join(string(fs), "hampshire.pod.json"), |
| 127 | } |
| 128 | |
| 129 | // create files |
| 130 | for _, file := range entityFiles { |
| 131 | _, err := os.Create(file) |
| 132 | if err != nil { |
| 133 | t.Fatal(err) |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | rcs, err := fs.Entities(entity.EntityReplicationController) |
| 138 | assert.NoError(t, err, "should be okay") |
| 139 | assert.Len(t, rcs, 0, "should not have any rcs") |
| 140 | |
| 141 | pods, err := fs.Entities(entity.EntityPod) |
| 142 | assert.NoError(t, err, "should be okay") |
| 143 | assert.Len(t, pods, 0, "should not have any pods") |
| 144 | |
| 145 | containers, err := fs.Entities(entity.EntityContainer) |
| 146 | assert.NoError(t, err, "should be okay") |
| 147 | assert.Len(t, containers, 0, "should not have any containers") |
| 148 | |
| 149 | images, err := fs.Entities(entity.EntityImage) |
| 150 | assert.NoError(t, err, "should be okay") |
| 151 | assert.Len(t, images, 0, "should not have any images") |
| 152 | } |
| 153 | |
| 154 | func TestSourceRCs(t *testing.T) { |
| 155 | fs := testTempFileSource(t) |
nothing calls this directly
no test coverage detected