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
Our [integration tests](integration-tests) are using the Amazon S3 Client to verify the server functionality against the
365
366
S3Mock. During the Maven build, the Docker image is started using the [docker-maven-plugin](https://dmp.fabric8.io/) and
366
-
the corresponding ports are passed to the JUnit test through the `maven-failsafe-plugin`. See [
367
-
`BucketIT`](integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/BucketIT.kt) as an example on how it's used
368
-
in the code.
367
+
the corresponding ports are passed to the JUnit test through the `maven-failsafe-plugin`. See [`BucketIT`](integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/BucketIT.kt)
368
+
as an example on how it's used in the code.
369
369
370
-
This way, one can easily switch between calling the S3Mock or the real S3 endpoint and this doesn't add any additional
370
+
This way, one can easily switch between calling the S3Mock or the real S3 endpoint, and this doesn't add any additional
The example [`S3MockContainerJupiterTest`](testsupport/testcontainers/src/test/kotlin/com/adobe/testing/s3mock/testcontainers/S3MockContainerJupiterTest.kt)
380
+
demonstrates the usage with JUnit 5. The example [`S3MockContainerManualTest`](testsupport/testcontainers/src/test/kotlin/com/adobe/testing/s3mock/testcontainers/S3MockContainerManualTest.kt)
381
+
demonstrates the usage with plain Kotlin. Java will be similar.
385
382
386
-
Testcontainers provides integrations for JUnit 4, JUnit 5 and Spock.
383
+
Testcontainers provide integrations for JUnit 4, JUnit 5 and Spock.
387
384
For more information, visit the [Testcontainers](https://www.testcontainers.org/) website.
Suppose we want to see what S3Mock is persisting, and look at the logs it generates in detail.
429
+
Suppose we want to see what S3Mock is persisting and look at the logs it generates in detail.
434
430
435
431
A local directory is needed, let's call it `locals3root`. This directory must be mounted as a volume into the Docker
436
432
container when it's started, and that mounted volume must then be configured as the `root` for S3Mock. Let's call the
@@ -512,7 +508,7 @@ $ ls locals3root/my-test-bucket
512
508
bucketMetadata.json
513
509
```
514
510
515
-
#### Start using self-signed SSL certificate
511
+
#### Start using a self-signed SSL certificate
516
512
517
513
S3Mock includes a self-signed SSL certificate:
518
514
@@ -572,13 +568,13 @@ the `S3Mock` during a JUnit test, classpaths of the tested application and of th
572
568
to unpredictable and undesired effects such as class conflicts or dependency version conflicts.
573
569
This is especially problematic if the tested application itself is a Spring (Boot) application, as both applications
574
570
will load configurations based on the availability of certain classes in the classpath, leading to unpredictable runtime
575
-
behaviour.
571
+
behavior.
576
572
577
573
_This is the opposite of what software engineers are trying to achieve when thoroughly testing code in continuous
578
574
integration..._
579
575
580
576
`S3Mock`dependencies are updated regularly, any update could break any number of projects.
581
-
**See also [issues labelled "dependency-problem"](https://github.com/adobe/S3Mock/issues?q=is%3Aissue+label%3Adependency-problem).**
577
+
**See also [issues labeled "dependency-problem"](https://github.com/adobe/S3Mock/issues?q=is%3Aissue+label%3Adependency-problem).**
582
578
583
579
**See also [the Java section below](#Java)**
584
580
@@ -605,11 +601,11 @@ The `S3MockExtension` can currently be used in two ways:
605
601
1. Declaratively using `@ExtendWith(S3MockExtension.class)` and by injecting a properly configured instance of
606
602
`AmazonS3`client and/or the started `S3MockApplication` to the tests.
607
603
See examples: [`S3MockExtensionDeclarativeTest`](testsupport/junit5/src/test/java/com/adobe/testing/s3mock/junit5/sdk1/S3MockExtensionDeclarativeTest.java) (for SDKv1)
608
-
or [`S3MockExtensionDeclarativeTest`](testsupport/junit5/src/test/java/com/adobe/testing/s3mock/junit5/sdk2/S3MockExtensionDeclarativeTest.java) (for SDKv2)
604
+
or [`S3MockExtensionDeclarativeTest`](testsupport/junit5/src/test/kotlin/com/adobe/testing/s3mock/junit5/sdk2/S3MockExtensionDeclarativeTest.kt) (for SDKv2)
609
605
610
606
2. Programmatically using `@RegisterExtension` and by creating and configuring the `S3MockExtension` using a _builder_.
611
607
See examples: [`S3MockExtensionProgrammaticTest`](testsupport/junit5/src/test/java/com/adobe/testing/s3mock/junit5/sdk1/S3MockExtensionProgrammaticTest.java) (for SDKv1)
612
-
or [`S3MockExtensionProgrammaticTest`](testsupport/junit5/src/test/java/com/adobe/testing/s3mock/junit5/sdk2/S3MockExtensionProgrammaticTest.java) (for SDKv2)
608
+
or [`S3MockExtensionProgrammaticTest`](testsupport/junit5/src/test/kotlin/com/adobe/testing/s3mock/junit5/sdk2/S3MockExtensionProgrammaticTest.kt) (for SDKv2)
613
609
614
610
To use the JUnit5 Extension, use the following Maven artifact in `test` scope:
615
611
@@ -624,9 +620,9 @@ To use the JUnit5 Extension, use the following Maven artifact in `test` scope:
624
620
625
621
#### Start using the TestNG Listener
626
622
627
-
The example [`S3MockListenerXMLConfigurationTest`](testsupport/testng/src/test/java/com/adobe/testing/s3mock/testng/S3MockListenerXmlConfigurationTest.java)
628
-
demonstrates the usage of the `S3MockListener`, which can be configured as shown in [`testng.xml`](testsupport/testng/src/test/resources/testng.xml).
629
-
The listener bootstraps the S3Mock application before TestNG execution starts and shuts down the application just before the execution terminates.
623
+
The example [`S3MockListenerXMLConfigurationTest`](testsupport/testng/src/test/kotlin/com/adobe/testing/s3mock/testng/S3MockListenerXmlConfigurationTest.kt)
624
+
demonstrates the usage of the `S3MockListener`, which can be configured as shown in [`testng.xml`](testsupport/testng/src/test/resources/testng.xml).
625
+
The listener bootstraps the S3Mock application before TestNG execution starts and shuts down the application just before the execution terminates.
630
626
Please refer to [`IExecutionListener`](https://github.com/testng-team/testng/blob/master/testng-core-api/src/main/java/org/testng/IExecutionListener.java)
631
627
in the TestNG API.
632
628
@@ -666,7 +662,7 @@ If the environment variable `COM_ADOBE_TESTING_S3MOCK_STORE_RETAIN_FILES_ON_EXIT
666
662
667
663
### Root-Folder
668
664
669
-
S3Mock stores buckets and objects a root-folder.
665
+
S3Mock stores buckets and objects in a root-folder.
670
666
671
667
This folder is expected to be empty when S3Mock starts. See also FYI above.
672
668
@@ -825,8 +821,8 @@ Vulnerabilities may also be reported through the GitHub issue tracker.
825
821
826
822
## Security
827
823
828
-
S3Mock is not intended to be used in production environments. It is a mock server that is meant to be used in
829
-
development and testing environments only. It does not implement all security features of AWS S3, and should not be used
824
+
S3Mock is not intended to be used in production environments. It is a mock server meant to be used in
825
+
development and testing environments only. It does not implement all security features of AWS S3 and should not be used
830
826
as a replacement for AWS S3 in production.
831
827
It is implemented using [Spring Boot](https://github.com/spring-projects/spring-boot), which is a Java framework that is
832
828
designed to be secure by default.
@@ -838,3 +834,6 @@ Contributions are welcome! Read the [Contributing Guide](./.github/CONTRIBUTING.
838
834
## Licensing
839
835
840
836
This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.
837
+
838
+
## Powered by
839
+
[](https://jb.gg/OpenSourceSupport)
0 commit comments