File tree Expand file tree Collapse file tree 9 files changed +3
-59
lines changed
src/test/java/cloud/localstack Expand file tree Collapse file tree 9 files changed +3
-59
lines changed Original file line number Diff line number Diff line change 11[ ![ CI] ( https://github.com/localstack/localstack-java-utils/actions/workflows/build.yml/badge.svg )] ( https://github.com/localstack/localstack-java-utils/actions/workflows/build.yml )
22[ ![ Maven Central] ( https://img.shields.io/maven-central/v/cloud.localstack/localstack-utils )] ( https://mvnrepository.com/artifact/cloud.localstack/localstack-utils )
3- [ ![ Thundra Foresight] ( https://thundra-assets-prod.s3.us-west-2.amazonaws.com/images/badges/thundra-foresight-badge-enabled.svg )] ( https://foresight.thundra.live/testRuns/71e743a6-b8d5-4d55-aa89-5299f3c3d08e )
3+
4+ ⚠️ Note: This repo is not currently very actively maintained. Please consider using the [ Testcontainers LocalStack Java module] ( https://java.testcontainers.org/modules/localstack/ ) as a potential alternative.
5+
46# LocalStack Java Utils
57
68Java utilities and JUnit integration for [ LocalStack] ( https://github.com/localstack/localstack ) .
Original file line number Diff line number Diff line change 317317 <version >2.12.1</version >
318318 <scope >test</scope >
319319 </dependency >
320- <dependency >
321- <groupId >io.thundra</groupId >
322- <artifactId >jexter-junit4-core</artifactId >
323- <version >${jexter.version} </version >
324- <scope >test</scope >
325- </dependency >
326- <dependency >
327- <groupId >io.thundra</groupId >
328- <artifactId >jexter-junit5-core</artifactId >
329- <version >${jexter.version} </version >
330- <scope >test</scope >
331- </dependency >
332-
333320 </dependencies >
334321
335322 <profiles >
Original file line number Diff line number Diff line change 1010import com .amazonaws .services .kinesis .model .GetShardIteratorRequest ;
1111import com .amazonaws .services .kinesis .model .PutRecordRequest ;
1212import com .amazonaws .services .kinesis .model .ResourceInUseException ;
13- import io .thundra .jexter .junit4 .core .sysprop .SystemPropertySandboxRule ;
1413import org .junit .Assert ;
1514import org .junit .Rule ;
1615import org .junit .Test ;
2625@ LocalstackDockerProperties (ignoreDockerRunErrors =true )
2726public class KinesisConsumerTest {
2827
29- // Revert system properties to the back after the test
30- @ Rule
31- public SystemPropertySandboxRule systemPropertySandboxRule = new SystemPropertySandboxRule ();
32-
3328 @ Test
3429 public void testGetRecordCBOR () throws Exception {
3530 System .setProperty (SDKGlobalConfiguration .AWS_CBOR_DISABLE_SYSTEM_PROPERTY , "false" );
Original file line number Diff line number Diff line change 4040import com .amazonaws .services .sqs .model .CreateQueueRequest ;
4141import com .amazonaws .services .sqs .model .ListQueuesResult ;
4242import com .amazonaws .util .IOUtils ;
43- import io .thundra .jexter .junit4 .core .envvar .EnvironmentVariableSandboxRule ;
44- import io .thundra .jexter .junit4 .core .sysprop .SystemPropertySandboxRule ;
45- import io .thundra .jexter .junit5 .core .envvar .EnvironmentVariableSandbox ;
4643import org .assertj .core .api .Assertions ;
4744import org .junit .Assert ;
4845import org .junit .ClassRule ;
6360@ RunWith (LocalstackTestRunner .class )
6461@ ExtendWith (LocalstackDockerExtension .class )
6562@ LocalstackDockerProperties (randomizePorts = true )
66- // [JUnit5] Revert environment variables to the back after the test suite (class)
67- @ EnvironmentVariableSandbox
6863public class BasicDockerFunctionalityTest {
6964
70- // [JUnit4] Revert environment variables to the back after the test suite (class)
71- @ ClassRule
72- public static EnvironmentVariableSandboxRule environmentVariableSandboxRule = new EnvironmentVariableSandboxRule ();
73-
7465 @ org .junit .BeforeClass
7566 @ org .junit .jupiter .api .BeforeAll
7667 public static void beforeAll () {
Original file line number Diff line number Diff line change 1212import com .amazonaws .services .sqs .AmazonSQS ;
1313import com .amazonaws .services .sqs .model .CreateQueueRequest ;
1414import com .amazonaws .services .sqs .model .ListQueuesResult ;
15- import io .thundra .jexter .junit4 .core .envvar .EnvironmentVariableSandboxRule ;
16- import io .thundra .jexter .junit5 .core .envvar .EnvironmentVariableSandbox ;
1715import org .assertj .core .api .Assertions ;
1816import org .junit .ClassRule ;
1917import org .junit .jupiter .api .extension .ExtendWith ;
3028@ RunWith (LocalstackTestRunner .class )
3129@ ExtendWith (LocalstackDockerExtension .class )
3230@ LocalstackDockerProperties (randomizePorts = true , services = "sqs" )
33- // [JUnit5] Revert environment variables to the back after the test suite (class)
34- @ EnvironmentVariableSandbox
3531public class DockerOnlySQSFunctionalityTest {
3632
37- // [JUnit4] Revert environment variables to the back after the test suite (class)
38- @ ClassRule
39- public static EnvironmentVariableSandboxRule environmentVariableSandboxRule = new EnvironmentVariableSandboxRule ();
40-
4133 @ org .junit .BeforeClass
4234 @ org .junit .jupiter .api .BeforeAll
4335 public static void beforeAll () {
Original file line number Diff line number Diff line change 77import cloud .localstack .sample .LambdaHandler ;
88import cloud .localstack .utils .LocalTestUtil ;
99import com .amazonaws .services .s3 .model .ObjectListing ;
10- import io .thundra .jexter .junit4 .core .sysprop .SystemPropertySandboxRule ;
1110import lombok .SneakyThrows ;
1211import lombok .val ;
1312import org .assertj .core .api .Assertions ;
109108@ LocalstackDockerProperties (ignoreDockerRunErrors =true )
110109public class BasicFeaturesSDKV2Test {
111110
112- // Revert system properties to the back after the test suite (class)
113- @ ClassRule
114- public static SystemPropertySandboxRule systemPropertySandboxRule = new SystemPropertySandboxRule ();
115-
116111 @ BeforeClass
117112 public static void beforeAll () {
118113 System .setProperty (SdkSystemSetting .CBOR_ENABLED .property (), "false" );
Original file line number Diff line number Diff line change 33import cloud .localstack .awssdkv2 .consumer .DeliveryStatusRecordProcessorFactory ;
44import cloud .localstack .awssdkv2 .consumer .EventProcessor ;
55import cloud .localstack .docker .annotation .LocalstackDockerProperties ;
6- import io .thundra .jexter .junit4 .core .sysprop .SystemPropertySandboxRule ;
76import org .junit .Assert ;
87import org .junit .Before ;
98import org .junit .Rule ;
@@ -34,10 +33,6 @@ public class KinesisSchedulerTest extends PowerMockLocalStack {
3433 String testMessage = "hello, world" ;
3534 Integer consumerCreationTime = 15 ; //35 for real AWS
3635
37- // Revert system properties to the back after the test
38- @ Rule
39- public SystemPropertySandboxRule systemPropertySandboxRule = new SystemPropertySandboxRule ();
40-
4136 @ Before
4237 public void mockServicesForScheduler () {
4338 System .setProperty (SdkSystemSetting .CBOR_ENABLED .property (), "false" );
Original file line number Diff line number Diff line change 22
33import cloud .localstack .LocalstackTestRunner ;
44import cloud .localstack .docker .annotation .LocalstackDockerProperties ;
5- import io .thundra .jexter .junit4 .core .sysprop .SystemPropertySandboxRule ;
65import org .junit .Assert ;
76import org .junit .Rule ;
87import org .junit .Test ;
2726@ LocalstackDockerProperties (ignoreDockerRunErrors = true )
2827public class KinesisV2ConsumerTest {
2928
30- // Revert system properties to the back after the test suite (class)
31- @ Rule
32- public SystemPropertySandboxRule systemPropertySandboxRule = new SystemPropertySandboxRule ();
33-
3429 @ Test
3530 public void testGetRecordCBOR () throws Exception {
3631 System .setProperty (SdkSystemSetting .CBOR_ENABLED .property (), "true" );
Original file line number Diff line number Diff line change 3232import com .amazonaws .services .sqs .model .ReceiveMessageResult ;
3333import com .amazonaws .services .sqs .model .SendMessageRequest ;
3434import com .amazonaws .services .sqs .model .SendMessageResult ;
35- import io .thundra .jexter .junit4 .core .envvar .EnvironmentVariableSandboxRule ;
36- import io .thundra .jexter .junit5 .core .envvar .EnvironmentVariableSandbox ;
3735import org .assertj .core .api .Assertions ;
3836import org .junit .Assert ;
3937import org .junit .ClassRule ;
5957@ ExtendWith (LocalstackExtension .class )
6058@ org .junit .Ignore
6159@ org .junit .jupiter .api .Disabled
62- // [JUnit5] Revert environment variables to the back after the test suite (class)
63- @ EnvironmentVariableSandbox
6460public class BasicFunctionalityTest {
6561
6662 static {
@@ -70,10 +66,6 @@ public class BasicFunctionalityTest {
7066 }
7167 }
7268
73- // [JUnit4] Revert environment variables to the back after the test suite (class)
74- @ ClassRule
75- public static EnvironmentVariableSandboxRule environmentVariableSandboxRule = new EnvironmentVariableSandboxRule ();
76-
7769 @ org .junit .BeforeClass
7870 @ org .junit .jupiter .api .BeforeAll
7971 public static void beforeAll () {
You can’t perform that action at this time.
0 commit comments