Skip to content

Commit

Permalink
Exclude Neo4j auto config from properties test
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltecourt committed Jul 11, 2017
1 parent df02c4e commit 8b50579
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {

}
Expand Down

0 comments on commit 8b50579

Please sign in to comment.