Try Local Stack for testing
This commit is contained in:
@@ -28,6 +28,7 @@ ext {
|
||||
dynamodbLockClientVersion = '1.1.0'
|
||||
jacksonVersion = '2.10.0'
|
||||
servletApiVersion = '4.0.1'
|
||||
localstackVersion = '0.1.22'
|
||||
log4jVersion = '2.12.1'
|
||||
springCloudAwsVersion = '2.2.0.BUILD-SNAPSHOT'
|
||||
springIntegrationVersion = '5.2.1.BUILD-SNAPSHOT'
|
||||
@@ -108,6 +109,7 @@ dependencies {
|
||||
|
||||
testCompile 'org.springframework.integration:spring-integration-test'
|
||||
testCompile "org.assertj:assertj-core:$assertjVersion"
|
||||
testCompile "cloud.localstack:localstack-utils:$localstackVersion"
|
||||
|
||||
testCompile ("org.awaitility:awaitility:$awaitilityVersion") {
|
||||
exclude group: 'org.hamcrest'
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.springframework.integration.aws;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import cloud.localstack.LocalstackTestRunner;
|
||||
import cloud.localstack.TestUtils;
|
||||
import com.amazonaws.services.s3.AmazonS3;
|
||||
|
||||
@RunWith(LocalstackTestRunner.class)
|
||||
public class MyCloudAppTests {
|
||||
|
||||
|
||||
@Test
|
||||
public void testLocalS3API() {
|
||||
AmazonS3 s3 = TestUtils.getClientS3();
|
||||
assertThat(s3).isNotNull();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user