Commit 1c90a89a authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '2.1.x'

parents 48fcaca1 8426d885
...@@ -241,13 +241,10 @@ ...@@ -241,13 +241,10 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.testcontainers</groupId> <groupId>org.testcontainers</groupId>
<artifactId>neo4j</artifactId> <artifactId>testcontainers-bom</artifactId>
<version>${testcontainers.version}</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version> <version>${testcontainers.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.zeroturnaround</groupId> <groupId>org.zeroturnaround</groupId>
......
/* /*
* Copyright 2012-2018 the original author or authors. * Copyright 2012-2019 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -19,10 +19,10 @@ package org.springframework.boot.test.autoconfigure.data.neo4j; ...@@ -19,10 +19,10 @@ package org.springframework.boot.test.autoconfigure.data.neo4j;
import org.junit.ClassRule; import org.junit.ClassRule;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.testcontainers.containers.Neo4jContainer;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.testsupport.testcontainers.Neo4jContainer;
import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
...@@ -43,7 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -43,7 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
public class DataNeo4jTestPropertiesIntegrationTests { public class DataNeo4jTestPropertiesIntegrationTests {
@ClassRule @ClassRule
public static Neo4jContainer neo4j = new Neo4jContainer(); public static Neo4jContainer<?> neo4j = new Neo4jContainer<>()
.withAdminPassword(null);
@Autowired @Autowired
private Environment environment; private Environment environment;
...@@ -59,8 +60,7 @@ public class DataNeo4jTestPropertiesIntegrationTests { ...@@ -59,8 +60,7 @@ public class DataNeo4jTestPropertiesIntegrationTests {
@Override @Override
public void initialize( public void initialize(
ConfigurableApplicationContext configurableApplicationContext) { ConfigurableApplicationContext configurableApplicationContext) {
TestPropertyValues TestPropertyValues.of("spring.data.neo4j.uri=" + neo4j.getBoltUrl())
.of("spring.data.neo4j.uri=bolt://localhost:" + neo4j.getMappedPort())
.applyTo(configurableApplicationContext.getEnvironment()); .applyTo(configurableApplicationContext.getEnvironment());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment