use of org.apache.sling.hc.api.execution.HealthCheckSelector in project sling by apache.
the class HealthCheckFilterTest method testWithTwoTagsExcludeOne.
@Test
public void testWithTwoTagsExcludeOne() {
HealthCheckSelector selector = tags("foo", "bar").withTags("-baz");
assertStrEquals("(&(objectClass=org.apache.sling.hc.api.HealthCheck)(!(hc.tags=baz))(hc.tags=foo)(hc.tags=bar))", filter.getServiceFilter(selector, false));
}
use of org.apache.sling.hc.api.execution.HealthCheckSelector in project sling by apache.
the class HealthCheckFilterTest method testWithTwoOrTagsAndTwoNames.
@Test
public void testWithTwoOrTagsAndTwoNames() {
HealthCheckSelector selector = empty().withNames("foo", "bar").withTags("t1", "t2");
assertStrEquals("(&(objectClass=org.apache.sling.hc.api.HealthCheck)(|(hc.tags=t1)(hc.tags=t2)(hc.name=foo)(hc.name=bar)))", filter.getServiceFilter(selector, true));
}
use of org.apache.sling.hc.api.execution.HealthCheckSelector in project sling by apache.
the class HealthCheckFilterTest method testWithOneName.
@Test
public void testWithOneName() {
HealthCheckSelector selector = names("foo");
assertStrEquals("(&(objectClass=org.apache.sling.hc.api.HealthCheck)(|(hc.name=foo)))", filter.getServiceFilter(selector, false));
}
use of org.apache.sling.hc.api.execution.HealthCheckSelector in project sling by apache.
the class HealthCheckFilterTest method testWithTwoTags.
@Test
public void testWithTwoTags() {
HealthCheckSelector selector = tags("foo", "bar");
assertStrEquals("(&(objectClass=org.apache.sling.hc.api.HealthCheck)(hc.tags=foo)(hc.tags=bar))", filter.getServiceFilter(selector, false));
}
use of org.apache.sling.hc.api.execution.HealthCheckSelector in project sling by apache.
the class HealthCheckFilterTest method testWithOneTag.
@Test
public void testWithOneTag() {
HealthCheckSelector selector = tags("foo");
assertStrEquals("(&(objectClass=org.apache.sling.hc.api.HealthCheck)(hc.tags=foo))", filter.getServiceFilter(selector, false));
}
Aggregations