use of com.yahoo.vespa.model.application.validation.change.VespaRefeedAction in project vespa by vespa-engine.
the class DocumentTypeChangeValidatorTest method requireThatChangingTargetTypeOfReferenceFieldIsNotOK.
@Test
public void requireThatChangingTargetTypeOfReferenceFieldIsNotOK() throws Exception {
DocumentTypeChangeValidator validator = new DocumentTypeChangeValidator(createDocumentTypeWithReferenceField("oldDoc"), createDocumentTypeWithReferenceField("newDoc"));
List<VespaConfigChangeAction> result = validator.validate(ValidationOverrides.empty, Instant.now());
assertEquals(1, result.size());
VespaConfigChangeAction action = result.get(0);
assertTrue(action instanceof VespaRefeedAction);
assertEquals("type='refeed', " + "message='Field 'ref' changed: data type: 'Reference<oldDoc>' -> 'Reference<newDoc>'', " + "services=[], documentType=''", action.toString());
}
Aggregations