(t *testing.T)
| 132 | } |
| 133 | |
| 134 | func TestUpdateStats(t *testing.T) { |
| 135 | statsList := itest.GenerateRandomStats(1, 4, 1*time.Second) |
| 136 | stats := statsList[0] |
| 137 | |
| 138 | cd, mockHandler, memoryCache, _ := newTestContainerData(t) |
| 139 | mockHandler.On("GetStats").Return( |
| 140 | stats, |
| 141 | nil, |
| 142 | ) |
| 143 | |
| 144 | err := cd.updateStats() |
| 145 | if err != nil { |
| 146 | t.Fatal(err) |
| 147 | } |
| 148 | |
| 149 | checkNumStats(t, memoryCache, 1) |
| 150 | mockHandler.AssertExpectations(t) |
| 151 | } |
| 152 | |
| 153 | func TestUpdateSpec(t *testing.T) { |
| 154 | spec := itest.GenerateRandomContainerSpec(4) |
nothing calls this directly
no test coverage detected
searching dependent graphs…