From d23168613760fc44979b3a38ade9a22b9e56a46f Mon Sep 17 00:00:00 2001 From: Waldemar Hummer Date: Mon, 24 Feb 2020 22:03:14 +0100 Subject: [PATCH] update README --- README.md | 44 +++----------------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index ede74725ae3bf..d6c097fd0ed54 100644 --- a/README.md +++ b/README.md @@ -372,11 +372,7 @@ awslocal lambda create-function --function-name myLambda \ ## Integration with Java/JUnit -In order to use LocalStack with Java, the project ships with a simple JUnit runner and a JUnit 5 -extension. Take a look at the example JUnit tests in `ext/java`. - -By default, the JUnit Test Runner starts LocalStack in a Docker container, for the duration of the test. -The container can be configured by using the `@LocalstackDockerProperties` annotation. +In order to use LocalStack with Java, the project ships with a simple JUnit runner, see sample below. ``` ... @@ -394,46 +390,12 @@ public class MyCloudAppTest { List buckets = s3.listBuckets(); ... } - -} -``` - -Or with JUnit 5 : - -``` -@ExtendWith(LocalstackDockerExtension.class) -@LocalstackDockerProperties(...) -public class MyCloudAppTest { - ... } ``` -The LocalStack JUnit test runner is published as an artifact in Maven Central. -Simply add the following dependency to your `pom.xml` file: - -``` - - cloud.localstack - localstack-utils - 0.2.0 - -``` - -You can configure the Docker behaviour using the `@LocalstackDockerProperties` annotation with the following parameters: - -| property | usage | type | default value | -|-----------------------------|------------------------------------------------------------------------------------------------------------------------------|------------------------------|---------------| -| `pullNewImage` | Determines if a new image is pulled from the docker repo before the tests are run. | boolean | `false` | -| `randomizePorts` | Determines if the container should expose the default local stack ports (4567-4583) or if it should expose randomized ports. | boolean | `false` | -| `services` | Determines which services should be run when the localstack starts. | String[] | All | -| `imageTag` | Use a specific image tag for docker container | String | `latest` | -| `hostNameResolver` | Used for determining the host name of the machine running the docker containers so that the containers can be addressed. | IHostNameResolver | `localhost` | -| `environmentVariableProvider` | Used for injecting environment variables into the container. | IEnvironmentVariableProvider | Empty Map | -| `useSingleDockerContainer` | Whether a singleton container should be used by all test classes. | boolean | `false` | - -_Note: When specifying the port in the `services` property, you cannot use `randomizePorts = true`_ +For more details and a complete list of configuration parameters, please refer to the [LocalStack Java Utils](https://github.com/localstack/localstack-java-utils) repository. -### Troubleshooting +## Troubleshooting * If you're using AWS Java libraries with Kinesis, please, refer to [CBOR protocol issues with the Java SDK guide](https://github.com/mhart/kinesalite#cbor-protocol-issues-with-the-java-sdk) how to disable CBOR protocol which is not supported by kinesalite.