use of com.netflix.titus.api.jobmanager.model.job.volume.SaaSVolumeSource in project titus-control-plane by Netflix.
the class JobModelSanitizationTest method testJobWithInvalidVolume.
@Test
public void testJobWithInvalidVolume() {
VolumeSource vs = new SaaSVolumeSource("BAD_SAAS_NAME");
Volume badVolume = Volume.newBuilder().withName("BAD_NAME").withVolumeSource(vs).build();
JobDescriptor<BatchJobExt> badJobDescriptor = oneTaskBatchJobDescriptor().but(jd -> jd.toBuilder().withVolumes(Collections.singletonList(badVolume)).build());
Set<ValidationError> violations = entitySanitizer.validate(badJobDescriptor);
assertThat(violations).hasSize(2);
}
Aggregations