use of com.sequenceiq.cloudbreak.domain.stack.StackPatchStatus in project cloudbreak by hortonworks.
the class StackPatchServiceTest method updateStatusWithoutReason.
@Test
void updateStatusWithoutReason() {
StackPatch stackPatch = new StackPatch();
StackPatchStatus status = StackPatchStatus.SCHEDULED;
StackPatch result = underTest.updateStatus(stackPatch, status);
assertThat(result).returns(status, StackPatch::getStatus).returns("", StackPatch::getStatusReason);
verify(stackPatchRepository).save(stackPatch);
}
use of com.sequenceiq.cloudbreak.domain.stack.StackPatchStatus in project cloudbreak by hortonworks.
the class StackPatchServiceTest method updateStatusWithReason.
@Test
void updateStatusWithReason() {
StackPatch stackPatch = new StackPatch();
String reason = "reason";
StackPatchStatus status = StackPatchStatus.SCHEDULED;
StackPatch result = underTest.updateStatusAndReportUsage(stackPatch, status, reason);
assertThat(result).returns(status, StackPatch::getStatus).returns(reason, StackPatch::getStatusReason);
verify(stackPatchRepository).save(stackPatch);
verify(stackPatchUsageReporterService).reportUsage(stackPatch);
}
Aggregations