use of io.fabric8.maven.core.config.ProcessorConfig in project fabric8-maven-plugin by fabric8io.
the class VertxHealthCheckEnricherTest method testDisabledUsingNegativePortUsingConfiguration.
@Test
public void testDisabledUsingNegativePortUsingConfiguration() {
final ProcessorConfig config = new ProcessorConfig(null, null, Collections.singletonMap("vertx-health-check", new TreeMap(ImmutableMap.of(VertxHealthCheckEnricher.Config.port.name(), "-1", VertxHealthCheckEnricher.Config.path.name(), "/ping"))));
new Expectations() {
{
context.getConfig();
result = config;
}
};
VertxHealthCheckEnricher enricher = new VertxHealthCheckEnricher(context);
Probe probe = enricher.getLivenessProbe();
assertNull(probe);
probe = enricher.getReadinessProbe();
assertNull(probe);
}
use of io.fabric8.maven.core.config.ProcessorConfig in project fabric8-maven-plugin by fabric8io.
the class EnricherConfigTest method simple.
@Test
public void simple() throws Exception {
Map<String, TreeMap> configMap = new HashMap<>();
TreeMap map = new TreeMap();
map.put("type", "LoadBalancer");
configMap.put("default.service", map);
EnricherConfig config = new EnricherConfig(new Properties(), "default.service", new ProcessorConfig(null, null, configMap));
assertEquals("LoadBalancer", config.get(Config.type));
}
Aggregations