use of com.yahoo.vespa.config.server.configchange.MockRefeedAction in project vespa by vespa-engine.
the class SessionPrepareHandlerTest method require_that_config_change_actions_are_logged_if_existing.
@Test
public void require_that_config_change_actions_are_logged_if_existing() throws Exception {
List<ServiceInfo> services = Collections.singletonList(new ServiceInfo("serviceName", "serviceType", null, ImmutableMap.of("clustername", "foo", "clustertype", "bar"), "configId", "hostName"));
ConfigChangeActions actions = new ConfigChangeActions(Arrays.asList(new MockRestartAction("change", services), new MockRefeedAction("change-id", false, "other change", services, "test")));
MockSession session = new MockSession(1, null, actions);
localRepo.addSession(session);
HttpResponse response = createHandler().handle(SessionHandlerTest.createTestRequest(pathPrefix, HttpRequest.Method.PUT, Cmd.PREPARED, 1L));
assertResponseContains(response, "Change(s) between active and new application that require restart:\\nIn cluster 'foo' of type 'bar");
assertResponseContains(response, "Change(s) between active and new application that may require re-feed:\\nchange-id: Consider removing data and re-feed document type 'test'");
}
Aggregations