use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsOlderSnapshot.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsOlderSnapshot(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
OffsetDateTime alertTime = DateUtils.createCurrentDateTimestamp();
OffsetDateTime dockerTagDate = alertTime.plusMinutes(80);
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0-" + versionSuffix, formatDate(alertTime, DOCKER_DATE_FORMAT), "1.0.0", formatDate(dockerTagDate, DOCKER_DATE_FORMAT), null);
assertTrue(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsNewerSnapshotPatch.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsNewerSnapshotPatch(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0.1-" + versionSuffix, null, "1.0.0", null, null);
assertFalse(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsNewerButCloseSnapshot.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsNewerButCloseSnapshot(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
OffsetDateTime alertTime = DateUtils.createCurrentDateTimestamp();
OffsetDateTime dockerTagDate = alertTime.minusMinutes(20);
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0-" + versionSuffix, formatDate(alertTime, DOCKER_DATE_FORMAT), "1.0.0", formatDate(dockerTagDate, DOCKER_DATE_FORMAT), null);
assertTrue(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsOlderButCloseDockerSnapshot.
@ParameterizedTest
@ValueSource(strings = { SUFFIX_SNAPSHOT, SUFFIX_SIGQA_1, SUFFIX_OTHER_TEXT })
public void testAlertIsOlderButCloseDockerSnapshot(String versionSuffix) {
UpdateChecker updateChecker = getEmptyUpdateChecker();
OffsetDateTime alertTime = DateUtils.createCurrentDateTimestamp();
OffsetDateTime dockerTagDate = alertTime.plusMinutes(20);
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0", formatDate(alertTime, DOCKER_DATE_FORMAT), "1.0.0-" + versionSuffix, formatDate(dockerTagDate, DOCKER_DATE_FORMAT), null);
assertFalse(updateModel.getUpdatable());
}
use of com.synopsys.integration.alert.update.model.UpdateModel in project hub-alert by blackducksoftware.
the class UpdateCheckerTest method testAlertIsNewerPatch.
@Test
public void testAlertIsNewerPatch() {
UpdateChecker updateChecker = getEmptyUpdateChecker();
UpdateModel updateModel = updateChecker.getUpdateModel("1.0.0.1", null, "1.0.0", null, null);
assertFalse(updateModel.getUpdatable());
}
Aggregations