use of com.yahoo.vespa.hosted.node.admin.component.Environment in project vespa by vespa-engine.
the class FilebeatConfigProviderTest method it_does_not_add_double_quotes.
@Test
public void it_does_not_add_double_quotes() {
Environment environment = getEnvironment(ImmutableList.of("unquoted", "\"quoted\""));
FilebeatConfigProvider filebeatConfigProvider = new FilebeatConfigProvider(environment);
Optional<String> config = filebeatConfigProvider.getConfig(getNodeSpec(tenant, application, instance));
assertThat(config.get(), containsString("hosts: [\"unquoted\",\"quoted\"]"));
}
use of com.yahoo.vespa.hosted.node.admin.component.Environment in project vespa by vespa-engine.
the class FilebeatConfigProviderTest method it_does_not_generate_config_when_no_logstash_nodes.
@Test
public void it_does_not_generate_config_when_no_logstash_nodes() {
Environment env = getEnvironment(Collections.emptyList());
FilebeatConfigProvider filebeatConfigProvider = new FilebeatConfigProvider(env);
Optional<String> config = filebeatConfigProvider.getConfig(getNodeSpec(tenant, application, instance));
assertFalse(config.isPresent());
}
Aggregations