Merge branch 'master' into master
This commit is contained in:
+2
-5
@@ -5,21 +5,18 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.util.TestPropertyValues;
|
||||
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.netflix.config.DynamicPropertyFactory;
|
||||
import com.netflix.config.DynamicStringProperty;
|
||||
|
||||
@RunWith(JUnitPlatform.class)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class ArchaiusBasicConfigurationIntegrationTest {
|
||||
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.baeldung.spring.cloud.archaius.dynamosources;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* To run this Live Test we need to:
|
||||
* * start a dynamodb instance locally on port 8000(e.g. with the following command `docker run -p 8000:8000 --name bael-dynamodb amazon/dynamodb-local`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = DynamoSourcesApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.spring.cloud.archaius.jdbconfig;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = JdbcSourcesApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.baeldung.spring.cloud.archaius.zookeeperconfig;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
* This Live tTest requires:
|
||||
* * A Zookeeper instance running locally on port 2181 (e.g. using `docker run --name bael-zookeeper -p 2181:2181 --restart always zookeeper`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ZookeeperConfigApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#### Running the Integration Tests
|
||||
|
||||
To run the Integration Tests, we need to have an AWS account and have API keys generated for programmatic access. Edit
|
||||
To run the Live Tests, we need to have an AWS account and have API keys generated for programmatic access. Edit
|
||||
the `application.properties` file to add the following properties:
|
||||
|
||||
```
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.baeldung.spring.cloud.aws;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringCloudAwsApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+9
-2
@@ -16,12 +16,19 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
import com.amazonaws.regions.Regions;
|
||||
import com.amazonaws.services.ec2.AmazonEC2;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
@TestPropertySource("classpath:application-test.properties")
|
||||
public class EC2MetadataIntegrationTest {
|
||||
public class EC2MetadataLiveTest {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(EC2MetadataIntegrationTest.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(EC2MetadataLiveTest.class);
|
||||
|
||||
private boolean serverEc2;
|
||||
|
||||
+8
-1
@@ -14,9 +14,16 @@ import java.sql.Statement;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
public class SpringCloudRDSIntegrationTest {
|
||||
public class SpringCloudRDSLiveTest {
|
||||
|
||||
@Autowired
|
||||
DataSource dataSource;
|
||||
+8
-1
@@ -23,10 +23,17 @@ import java.util.UUID;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
@TestPropertySource("classpath:application-test.properties")
|
||||
public class SpringCloudS3IntegrationTest {
|
||||
public class SpringCloudS3LiveTest {
|
||||
|
||||
@Autowired
|
||||
private SpringCloudS3 springCloudS3;
|
||||
+8
-1
@@ -16,10 +16,17 @@ import com.amazonaws.services.sns.model.CreateTopicResult;
|
||||
import com.baeldung.spring.cloud.aws.SpringCloudAwsTestUtil;
|
||||
import com.baeldung.spring.cloud.aws.sqs.Greeting;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
@TestPropertySource("classpath:application-test.properties")
|
||||
public class SpringCloudSNSIntegrationTest {
|
||||
public class SpringCloudSNSLiveTest {
|
||||
|
||||
@Autowired
|
||||
private SNSMessageSender snsMessageSender;
|
||||
+9
-2
@@ -26,12 +26,19 @@ import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
*
|
||||
* To run this Live Test, we need to have an AWS account and have API keys generated for programmatic access.
|
||||
*
|
||||
* Check the README file in this module for more information.
|
||||
*
|
||||
*/
|
||||
@SpringBootTest
|
||||
@RunWith(SpringRunner.class)
|
||||
@TestPropertySource("classpath:application-test.properties")
|
||||
public class SpringCloudSQSIntegrationTest {
|
||||
public class SpringCloudSQSLiveTest {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(SpringCloudSQSIntegrationTest.class);
|
||||
private static final Logger logger = LoggerFactory.getLogger(SpringCloudSQSLiveTest.class);
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
@@ -6,7 +6,7 @@
|
||||
- [Spring Cloud – Adding Angular 4](http://www.baeldung.com/spring-cloud-angular)
|
||||
|
||||
- To run the project:
|
||||
- copy the appliction-config folder to c:\Users\{username}\ on Windows or /Users/{username}/ on *nix. Then open a git bash terminal in application-config and run:
|
||||
- copy the appliction-config folder to c:\Users\{username}\ on Windows or /home/{username}/ on *nix. Then open a git bash terminal in application-config and run:
|
||||
- git init
|
||||
- git add .
|
||||
- git commit -m "First commit"
|
||||
|
||||
+7
-1
@@ -7,9 +7,15 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.spring.cloud.bootstrap.discovery.DiscoveryApplication;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = DiscoveryApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
@@ -98,6 +98,6 @@
|
||||
</plugins>
|
||||
</build>
|
||||
<properties>
|
||||
<spring-cloud-dependencies.version>Brixton.SR7</spring-cloud-dependencies.version>
|
||||
<spring-cloud-dependencies.version>Dalston.RELEASE</spring-cloud-dependencies.version>
|
||||
</properties>
|
||||
</project>
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class GatewayApplication {
|
||||
InstanceInfo instance = eurekaClient.getNextServerFromEureka("zipkin", false);
|
||||
if (!(baseUrl != null && instance.getHomePageUrl().equals(baseUrl))) {
|
||||
baseUrl = instance.getHomePageUrl();
|
||||
delegate = new HttpZipkinSpanReporter(baseUrl, zipkinProperties.getFlushInterval(), zipkinProperties.getCompression().isEnabled(), spanMetricReporter);
|
||||
delegate = new HttpZipkinSpanReporter(new RestTemplate(), baseUrl, zipkinProperties.getFlushInterval(), spanMetricReporter);
|
||||
if (!span.name.matches(skipPattern)) delegate.report(span);
|
||||
}
|
||||
if (!span.name.matches(skipPattern)) delegate.report(span);
|
||||
|
||||
+7
-1
@@ -7,9 +7,15 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.spring.cloud.bootstrap.gateway.GatewayApplication;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = GatewayApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
@@ -0,0 +1,2 @@
|
||||
# This property would be provided by the config service in a real-case scenario
|
||||
spring.sleuth.web.skipPattern=(^cleanup.|.+favicon.)
|
||||
@@ -72,7 +72,7 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<spring-cloud-dependencies.version>Brixton.SR7</spring-cloud-dependencies.version>
|
||||
<spring-cloud-dependencies.version>Dalston.RELEASE</spring-cloud-dependencies.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
+3
-1
@@ -12,6 +12,8 @@ import org.springframework.cloud.sleuth.zipkin.HttpZipkinSpanReporter;
|
||||
import org.springframework.cloud.sleuth.zipkin.ZipkinProperties;
|
||||
import org.springframework.cloud.sleuth.zipkin.ZipkinSpanReporter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import zipkin.Span;
|
||||
|
||||
@SpringBootApplication
|
||||
@@ -42,7 +44,7 @@ public class BookServiceApplication {
|
||||
InstanceInfo instance = eurekaClient.getNextServerFromEureka("zipkin", false);
|
||||
if (!(baseUrl != null && instance.getHomePageUrl().equals(baseUrl))) {
|
||||
baseUrl = instance.getHomePageUrl();
|
||||
delegate = new HttpZipkinSpanReporter(baseUrl, zipkinProperties.getFlushInterval(), zipkinProperties.getCompression().isEnabled(), spanMetricReporter);
|
||||
delegate = new HttpZipkinSpanReporter(new RestTemplate(), baseUrl, zipkinProperties.getFlushInterval(), spanMetricReporter);
|
||||
if (!span.name.matches(skipPattern)) delegate.report(span);
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -7,9 +7,15 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.spring.cloud.bootstrap.svcbook.BookServiceApplication;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = BookServiceApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
@@ -0,0 +1,2 @@
|
||||
# This property would be provided by the config service in a real-case scenario
|
||||
spring.sleuth.web.skipPattern=(^cleanup.|.+favicon.)
|
||||
@@ -81,7 +81,7 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<spring-cloud-dependencies.version>Brixton.SR7</spring-cloud-dependencies.version>
|
||||
<spring-cloud-dependencies.version>Dalston.RELEASE</spring-cloud-dependencies.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
+2
-1
@@ -16,6 +16,7 @@ import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import com.netflix.appinfo.InstanceInfo;
|
||||
import com.netflix.discovery.EurekaClient;
|
||||
@@ -52,7 +53,7 @@ public class RatingServiceApplication {
|
||||
InstanceInfo instance = eurekaClient.getNextServerFromEureka("zipkin", false);
|
||||
if (!(baseUrl != null && instance.getHomePageUrl().equals(baseUrl))) {
|
||||
baseUrl = instance.getHomePageUrl();
|
||||
delegate = new HttpZipkinSpanReporter(baseUrl, zipkinProperties.getFlushInterval(), zipkinProperties.getCompression().isEnabled(), spanMetricReporter);
|
||||
delegate = new HttpZipkinSpanReporter(new RestTemplate(), baseUrl, zipkinProperties.getFlushInterval(), spanMetricReporter);
|
||||
if (!span.name.matches(skipPattern)) delegate.report(span);
|
||||
}
|
||||
if (!span.name.matches(skipPattern)) delegate.report(span);
|
||||
|
||||
+8
-1
@@ -7,9 +7,16 @@ import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.spring.cloud.bootstrap.svcrating.RatingServiceApplication;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = RatingServiceApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
@@ -0,0 +1,2 @@
|
||||
# This property would be provided by the config service in a real-case scenario
|
||||
spring.sleuth.web.skipPattern=(^cleanup.|.+favicon.)
|
||||
+7
-4
@@ -1,4 +1,4 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.spring.cloud.config.client;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -6,12 +6,15 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
import com.baeldung.spring.cloud.config.client.ConfigClient;
|
||||
|
||||
/**
|
||||
*
|
||||
* The app needs the server running on port 8888. Can be started with docker
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = ConfigClient.class)
|
||||
@WebAppConfiguration
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
+1
-7
@@ -6,16 +6,10 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* The context will load successfully with some properties provided by docker
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = ConfigServer.class)
|
||||
@WebAppConfiguration
|
||||
public class SpringContextLiveTest {
|
||||
public class SpringContextIntegrationTest {
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
### This should be provided by the docker config
|
||||
spring.cloud.config.server.git.uri=classpath:.
|
||||
@@ -4,5 +4,6 @@ spring.datasource.maxIdle=5
|
||||
spring.datasource.minIdle=2
|
||||
spring.datasource.initialSize=5
|
||||
spring.datasource.removeAbandoned=true
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.spring.cloud.connectors.heroku;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -0,0 +1,2 @@
|
||||
spring.jpa.hibernate.ddl-auto=create
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||
+10
-2
@@ -1,4 +1,4 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.spring.cloud.consul;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -9,10 +9,18 @@ import com.baeldung.spring.cloud.consul.discovery.DiscoveryClientApplication;
|
||||
import com.baeldung.spring.cloud.consul.health.ServiceDiscoveryApplication;
|
||||
import com.baeldung.spring.cloud.consul.properties.DistributedPropertiesApplication;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live test requires:
|
||||
* * a Consul instance running on port 8500
|
||||
* * Consul configured with particular properties (e.g. 'my.prop')
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = { DiscoveryClientApplication.class, ServiceDiscoveryApplication.class,
|
||||
DistributedPropertiesApplication.class })
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
@@ -50,7 +50,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>1.2.2.RELEASE</spring-cloud.version>
|
||||
<spring-boot.version>1.5.9.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
@@ -64,7 +64,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>Edgware.SR1</spring-cloud.version>
|
||||
<spring-boot.version>1.5.9.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-function.version>1.0.1.RELEASE</spring-cloud-function.version>
|
||||
<aws-lambda-events.version>2.0.2</aws-lambda-events.version>
|
||||
<spring-boot.version>2.0.4.RELEASE</spring-boot.version>
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.spring.cloudfunction.aws;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = CloudFunctionAwsApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,6 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-dependencies.version>Finchley.SR2</spring-cloud-dependencies.version>
|
||||
<spring.cloud.k8s.version>1.0.0.RELEASE</spring.cloud.k8s.version>
|
||||
</properties>
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-boot.version>1.5.17.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-boot.version>1.5.17.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud-dependencies.version>Finchley.SR2</spring-cloud-dependencies.version>
|
||||
</properties>
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.baeldung.spring.cloud.kubernetes.travelagency;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+5
-4
@@ -1,4 +1,5 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.cloud.openfeign;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -6,10 +7,10 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = BooksApiApplication.class)
|
||||
@SpringBootTest(classes = ExampleApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = BooksApiApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringCloudRestServerApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
/**
|
||||
*
|
||||
* This Live Test requires:
|
||||
* * A Redis instance running in port 6379 (e.g. using `docker run --name some-redis -p 6379:6379 -d redis`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = BookReviewsApiApplication.class)
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.twitterhdfs.aggregate;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -6,7 +6,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = BookReviewsApiApplication.class)
|
||||
@SpringBootTest(classes = AggregateApp.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.twitterhdfs.aggregate.AggregateApp;
|
||||
import com.baeldung.twitterhdfs.processor.ProcessorApp;
|
||||
import com.baeldung.twitterhdfs.sink.SinkApp;
|
||||
import com.baeldung.twitterhdfs.source.SourceApp;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = {AggregateApp.class, ProcessorApp.class, SinkApp.class, SourceApp.class})
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,11 +3,11 @@ logging:
|
||||
org:
|
||||
springframework:
|
||||
cloud:
|
||||
task=DEBUG
|
||||
task: DEBUG
|
||||
|
||||
spring:
|
||||
application:
|
||||
name=helloWorld
|
||||
name: helloWorld
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/springcloud?useSSL=false
|
||||
username: root
|
||||
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.baeldung.task.JobConfiguration;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = JobConfiguration.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package org.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.context.ConfigFileApplicationContextInitializer;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
import com.baeldung.task.JobConfiguration;
|
||||
import com.baeldung.task.TaskDemo;
|
||||
|
||||
/**
|
||||
* This Live Test requires:
|
||||
* * a MySql instance running, that allows a root user with no password, and with a database named
|
||||
*
|
||||
* (e.g. with the following command `docker run -p 3306:3306 --name bael-mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=true -e MYSQL_DATABASE=springcloud mysql:latest`)
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootApplication
|
||||
@ContextConfiguration(classes = { JobConfiguration.class, TaskDemo.class }, initializers = {
|
||||
ConfigFileApplicationContextInitializer.class })
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>Greenwich.RELEASE</spring-cloud.version>
|
||||
</properties>
|
||||
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.spring.cloud.aws;
|
||||
package org.baeldung.spring.cloud.vaultsample;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -6,10 +6,10 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringCloudAwsApplication.class)
|
||||
@SpringBootTest(classes = VaultSampleApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,6 +34,12 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
+5
-4
@@ -1,4 +1,5 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.spring.cloud.helloworld;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -6,10 +7,10 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringCloudRestServerApplication.class)
|
||||
@SpringBootTest(classes = HelloWorldApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,7 +70,6 @@
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>Finchley.SR1</spring-cloud.version>
|
||||
<spring-boot.version>2.0.6.RELEASE</spring-boot.version>
|
||||
</properties>
|
||||
|
||||
+4
-4
@@ -1,17 +1,17 @@
|
||||
package org.baeldung;
|
||||
package com.baeldung.spring.cloud.zuulratelimitdemo.controller;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.spring.cloud.bootstrap.config.ConfigApplication;
|
||||
import com.baeldung.spring.cloud.zuulratelimitdemo.ZuulRatelimitDemoApplication;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = ConfigApplication.class)
|
||||
@SpringBootTest(classes = ZuulRatelimitDemoApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user