Search in sources :

Example 1 with VespaRefeedAction

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());
}
Also used : VespaRefeedAction(com.yahoo.vespa.model.application.validation.change.VespaRefeedAction) VespaConfigChangeAction(com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction) Test(org.junit.Test)

Aggregations

VespaConfigChangeAction (com.yahoo.vespa.model.application.validation.change.VespaConfigChangeAction)1 VespaRefeedAction (com.yahoo.vespa.model.application.validation.change.VespaRefeedAction)1 Test (org.junit.Test)1