From 8b50579b37e53690ab65b345c2802ef0ef57f3e7 Mon Sep 17 00:00:00 2001 From: michaeltecourt Date: Tue, 11 Jul 2017 17:26:08 +0200 Subject: [PATCH] Exclude Neo4j auto config from properties test --- ...ndpointConfigurationPropertiesDetectorTest.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cereebro-snitch/src/test/java/io/cereebro/snitch/actuate/SnitchEndpointConfigurationPropertiesDetectorTest.java b/cereebro-snitch/src/test/java/io/cereebro/snitch/actuate/SnitchEndpointConfigurationPropertiesDetectorTest.java index 73199c2..b40c8a6 100644 --- a/cereebro-snitch/src/test/java/io/cereebro/snitch/actuate/SnitchEndpointConfigurationPropertiesDetectorTest.java +++ b/cereebro-snitch/src/test/java/io/cereebro/snitch/actuate/SnitchEndpointConfigurationPropertiesDetectorTest.java @@ -23,6 +23,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration; +import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration; +import org.springframework.boot.autoconfigure.data.neo4j.Neo4jRepositoriesAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; @@ -55,17 +57,17 @@ public void testPropertiesRelationships() { .contentType(ContentType.JSON) .body("componentRelationships[0].component.name", Matchers.is("app-props-detector")) .body("componentRelationships[0].component.type", Matchers.is("properties/application")) - .body("componentRelationships[0].dependencies", Matchers.hasSize(2)) // one for component from props, one for neo4j - .body("componentRelationships[0].dependencies.find { it.component.name == 'dependency' }.component.type", - Matchers.is("properties/dependency")) - .body("componentRelationships[0].dependencies.find { it.component.name == 'default' }.component.type", - Matchers.is("database/neo4j")) + .body("componentRelationships[0].dependencies", Matchers.hasSize(1)) + .body("componentRelationships[0].dependencies[0].component.name", Matchers.is("dependency")) + .body("componentRelationships[0].dependencies[0].component.type", Matchers.is("properties/dependency")) + .body("componentRelationships[0].consumers", Matchers.hasSize(1)) .body("componentRelationships[0].consumers[0].component.name", Matchers.is("consumer")) .body("componentRelationships[0].consumers[0].component.type", Matchers.is("properties/consumer")); // @formatter:on } - @SpringBootApplication(exclude = { RabbitAutoConfiguration.class, MongoAutoConfiguration.class }) + @SpringBootApplication(exclude = { RabbitAutoConfiguration.class, MongoAutoConfiguration.class, + Neo4jDataAutoConfiguration.class, Neo4jRepositoriesAutoConfiguration.class }) static class SnitchEndpointConfigurationPropertiesDetectorTestApplication { }