use of com.yahoo.vespa.model.application.validation.ValidationTester in project vespa by vespa-engine.
the class ContentClusterRemovalValidatorTest method testContentRemovalValidation.
@Test
public void testContentRemovalValidation() throws IOException, SAXException {
ValidationTester tester = new ValidationTester();
VespaModel previous = tester.deploy(null, getServices("contentClusterId"), null).getFirst();
try {
tester.deploy(previous, getServices("newContentClusterId"), null);
fail("Expected exception due to content cluster id change");
} catch (IllegalArgumentException expected) {
assertEquals("content-cluster-removal: Content cluster 'contentClusterId' is removed. This will cause loss of all data in this cluster", Exceptions.toMessageString(expected));
}
}
Aggregations