use of com.mesosphere.sdk.offer.UnreserveOfferRecommendation in project dcos-commons by mesosphere.
the class DecommissionRecorderTest method testUnreserve.
@Test
public void testUnreserve() throws Exception {
when(mockStateStore.fetchGoalOverrideStatus(TestConstants.TASK_NAME)).thenReturn(DecommissionPlanFactory.DECOMMISSIONING_STATUS);
recorder.record(new UnreserveOfferRecommendation(null, taskResource));
verify(mockStateStore).storeTasks(Arrays.asList(emptyTaskA, emptyTaskB));
}
use of com.mesosphere.sdk.offer.UnreserveOfferRecommendation in project dcos-commons by mesosphere.
the class DecommissionRecorderTest method testUnreserveNotDecommissioning.
@Test
public void testUnreserveNotDecommissioning() throws Exception {
when(mockStateStore.fetchGoalOverrideStatus(TestConstants.TASK_NAME)).thenReturn(GoalStateOverride.Status.INACTIVE);
recorder.record(new UnreserveOfferRecommendation(null, taskResource));
verify(mockStateStore, times(0)).storeTasks(any());
}
Aggregations