You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* localstack-master: (27 commits)
Added tests to show the exception on the SES client V2
release version v0.2.15
refactor logging config; fix Kinesis CBOR tests
fix project setup and classpath for SDK v1/v2 utils
fix awaiting results in tests using async clients
adjust CI config to use new make targets; fix imports for SDK v1/v2 compatibility
refactor classpath setup for v1/v2 SDKs; fall back to using edge port if port mapping cannot be determined from container
add ability to get handler class name through "_HANDLER" environment variable like in real AWS (localstack#67)
implement empty methods in `LambdaContext` (localstack#66)
release version 0.2.13
increate number of scanned log lines to 100 when searching for "Ready." token (localstack#64)
consider Windows EOL when listing images (localstack#65)
release version 0.2.11
fix endpoint URL for getClientLambdaAsyncV2 (localstack#60)
add simple tests for IAM service (localstack#62)
read port config file in multiple locations for different Python versions in the container (localstack#59)
Bump logback-classic from 1.0.13 to 1.2.0 (localstack#56)
log which image is being pulled (localstack#58)
Bump commons-io from 2.6 to 2.7 (localstack#53)
add simple test for KMS (localstack#54)
...
@@ -19,7 +20,7 @@ extension. Take a look at the example JUnit tests in `src/test/java`.
19
20
By default, the JUnit Test Runner starts LocalStack in a Docker container, for the duration of the test.
20
21
The container can be configured by using the `@LocalstackDockerProperties` annotation.
21
22
22
-
```
23
+
```java
23
24
...
24
25
importcloud.localstack.LocalstackTestRunner;
25
26
importcloud.localstack.ServiceName;
@@ -42,7 +43,7 @@ public class MyCloudAppTest {
42
43
43
44
Or with JUnit 5:
44
45
45
-
```
46
+
```java
46
47
@ExtendWith(LocalstackDockerExtension.class)
47
48
@LocalstackDockerProperties(...)
48
49
publicclassMyCloudAppTest {
@@ -55,11 +56,11 @@ public class MyCloudAppTest {
55
56
The LocalStack JUnit test runner is published as an artifact in Maven Central.
56
57
Simply add the following dependency to your `pom.xml` file:
57
58
58
-
```
59
+
```xml
59
60
<dependency>
60
61
<groupId>cloud.localstack</groupId>
61
62
<artifactId>localstack-utils</artifactId>
62
-
<version>0.2.7</version>
63
+
<version>0.2.15</version>
63
64
</dependency>
64
65
```
65
66
@@ -76,8 +77,10 @@ You can configure the Docker behaviour using the `@LocalstackDockerProperties` a
76
77
|`portEdge`| Port number for the edge service, the main entry point for all API invocations | String |`4566`|
77
78
|`portElasticSearch`| Port number for the elasticsearch service | String |`4571`|
78
79
|`hostNameResolver`| Used for determining the host name of the machine running the docker containers so that the containers can be addressed. | IHostNameResolver |`localhost`|
79
-
|`environmentVariableProvider`| Used for injecting environment variables into the container. | IEnvironmentVariableProvider | Empty Map |
80
-
|`useSingleDockerContainer`| Whether a singleton container should be used by all test classes. | boolean |`false`|
80
+
|`environmentVariableProvider`| Used for injecting environment variables into the container. | IEnvironmentVariableProvider | Empty Map |
81
+
|`bindMountProvider`| Used bind mounting files and directories into the container, useful to run init scripts before using the container. | IBindMountProvider | Empty Map |
82
+
|`initializationToken`| Give a regex that will be searched in the logstream of the container, start is complete only when the token is found. Use with bindMountProvider to execute init scripts. | String | Empty String |
83
+
|`useSingleDockerContainer`| Whether a singleton container should be used by all test classes. | boolean |`false`|
81
84
82
85
For more details, please refer to the README of the main LocalStack repo: https://github.com/localstack/localstack
83
86
@@ -98,19 +101,74 @@ _Note: When specifying the port in the `services` property, you cannot use `rand
98
101
## Building
99
102
100
103
To build the latest version of the code via Maven:
101
-
```
104
+
105
+
```sh
102
106
make build
103
107
```
104
108
105
109
## Change Log
106
110
111
+
* v0.2.15: Fix Kinesis CBOR tests; fix project setup and classpath for SDK v1/v2 utils; fix awaiting results in tests using async clients; refactor classpath setup for v1/v2 SDKs; fall back to using edge port if port mapping cannot be determined from container
112
+
* v0.2.14: Add ability to get handler class name through `_HANDLER` environment variable like on real AWS and Lambci environment
113
+
* v0.2.11: Enable specification of "platform" when configuring container
114
+
* v0.2.10: Add Lambda async utils for AWS SDK v2; add support for specifying bind mounts and init scripts via `@LocalstackDockerProperties`; add PowerMock integration for easy patching of AWS SDK to use local endpoints; add support for configuring the Docker image name via `@LocalstackDockerProperties`; add tests for templated emails
115
+
* v0.2.8: Allow overwriting the port binding via environment variables
107
116
* v0.2.7: Extend `@LocalstackDockerProperties` to include port binding
108
117
* v0.2.6: Add new path to possible docker exe locations in Windows; add various additional tests for v1 and v2 SDKs (Kinesis, SQS, SSM & SecretsManager, ...)
109
118
* v0.2.5: Refactor code to accommodate edge port config for all services; add CloudWatch Logs endpoint configuration
110
119
* v0.2.2: Addition of CloudWatch Logs endpoint configuration; adjust tests to use central edge service endpoint
111
120
* v0.2.1: Move Java sources into separate project; mark non-Docker Java `LocalstackExtension` as deprecated; update paths for Python code lookup in Docker container
112
121
* v0.2.0: Last version still maintained in LocalStack main repo
113
122
123
+
## PowerMock
124
+
125
+
You can use the PowerMock Library to call the builders default method and still get LocalStack version of the AWS clients.
0 commit comments