(t *testing.T)
| 100 | } |
| 101 | |
| 102 | func TestUpdateSubcontainersWithError(t *testing.T) { |
| 103 | cd, mockHandler, _, _ := newTestContainerData(t) |
| 104 | mockHandler.On("ListContainers", container.ListSelf).Return( |
| 105 | []info.ContainerReference{}, |
| 106 | fmt.Errorf("some error"), |
| 107 | ) |
| 108 | mockHandler.On("Exists").Return(true) |
| 109 | |
| 110 | assert.NotNil(t, cd.updateSubcontainers()) |
| 111 | assert.Empty(t, cd.info.Subcontainers, "subcontainers should not be populated on failure") |
| 112 | mockHandler.AssertExpectations(t) |
| 113 | } |
| 114 | |
| 115 | func TestUpdateSubcontainersWithErrorOnDeadContainer(t *testing.T) { |
| 116 | cd, mockHandler, _, _ := newTestContainerData(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…