Try Local Stack for testing

This commit is contained in:
Artem Bilan
2019-10-18 10:43:40 -04:00
parent c536faddd8
commit 52301a56d4
2 changed files with 24 additions and 0 deletions

View File

@@ -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'

View File

@@ -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();
}
}