springboot-testcontainer-awss3mock

AwsS3Mock test-container

Лицензия

Лицензия

Категории

Категории

IDE Инструменты разработки AWS Контейнер PaaS Providers
Группа

Группа

com.avides.springboot.testcontainer
Идентификатор

Идентификатор

springboot-testcontainer-awss3mock
Последняя версия

Последняя версия

1.0.0-RC3
Дата

Дата

Тип

Тип

jar
Описание

Описание

springboot-testcontainer-awss3mock
AwsS3Mock test-container
Ссылка на сайт

Ссылка на сайт

https://github.com/springboot-testcontainer/springboot-testcontainer-awss3mock
Организация-разработчик

Организация-разработчик

AVIDES Media AG
Система контроля версий

Система контроля версий

https://github.com/springboot-testcontainer/springboot-testcontainer-awss3mock

Скачать springboot-testcontainer-awss3mock

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.avides.springboot.testcontainer/springboot-testcontainer-awss3mock/ -->
<dependency>
    <groupId>com.avides.springboot.testcontainer</groupId>
    <artifactId>springboot-testcontainer-awss3mock</artifactId>
    <version>1.0.0-RC3</version>
</dependency>
// https://jarcasting.com/artifacts/com.avides.springboot.testcontainer/springboot-testcontainer-awss3mock/
implementation 'com.avides.springboot.testcontainer:springboot-testcontainer-awss3mock:1.0.0-RC3'
// https://jarcasting.com/artifacts/com.avides.springboot.testcontainer/springboot-testcontainer-awss3mock/
implementation ("com.avides.springboot.testcontainer:springboot-testcontainer-awss3mock:1.0.0-RC3")
'com.avides.springboot.testcontainer:springboot-testcontainer-awss3mock:jar:1.0.0-RC3'
<dependency org="com.avides.springboot.testcontainer" name="springboot-testcontainer-awss3mock" rev="1.0.0-RC3">
  <artifact name="springboot-testcontainer-awss3mock" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.avides.springboot.testcontainer', module='springboot-testcontainer-awss3mock', version='1.0.0-RC3')
)
libraryDependencies += "com.avides.springboot.testcontainer" % "springboot-testcontainer-awss3mock" % "1.0.0-RC3"
[com.avides.springboot.testcontainer/springboot-testcontainer-awss3mock "1.0.0-RC3"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
com.avides.springboot.testcontainer : springboot-testcontainer-common jar 1.0.0-RC2
com.amazonaws : aws-java-sdk-s3 jar 1.11.683

provided (2)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.10
org.springframework.boot : spring-boot-autoconfigure jar 2.2.1.RELEASE

test (8)

Идентификатор библиотеки Тип Версия
org.assertj : assertj-core jar 3.14.0
org.easymock : easymock jar 4.1
org.powermock : powermock-module-junit4 jar 2.0.4
org.powermock : powermock-api-easymock jar 2.0.4
org.jacoco : org.jacoco.agent jar 0.8.5
org.springframework : spring-test jar 5.2.1.RELEASE
org.springframework.boot : spring-boot-test jar 2.2.1.RELEASE
ch.qos.logback : logback-classic jar 1.2.3

Модули Проекта

Данный проект не имеет модулей.

springtainer-awss3mock

Maven Central Build Nightly build Coverage report Quality Gate Technical dept

Dependency

<dependency>
	<groupId>com.avides.springboot.springtainer</groupId>
	<artifactId>springtainer-awss3mock</artifactId>
	<version>1.2.0</version>
	<scope>test</scope>
</dependency>

Configuration

Properties consumed (in bootstrap-it.properties):

  • embedded.container.awss3mock.enabled (default is true)
  • embedded.container.awss3mock.startup-timeout (default is 30)
  • embedded.container.awss3mock.docker-image (default is adobe/s3mock:2.1.21)
  • embedded.container.awss3mock.endpoint-http-port (default is 9090)
  • embedded.container.awss3mock.endpoint-https-port (default is 9191)

Properties provided (in application-it.properties):

  • embedded.container.awss3mock.endpoint.http.url
  • embedded.container.awss3mock.endpoint.https.url

Example for minimal configuration in application-it.properties:

any-s3-endpoint.url=${embedded.container.awss3mock.endpoint.http.url}

A properly configured AmazonS3 Object can be provided by the AmazonS3Helper.

Logging

To reduce logging insert this into the logback-configuration:

<!-- Springtainer -->
<logger name="com.github.dockerjava.jaxrs" level="WARN" />
<logger name="com.github.dockerjava.core.command" level="WARN" />
<logger name="org.apache.http" level="WARN" />

Labels

The container exports multiple labels to analyze running springtainers:

  • SPRINGTAINER_SERVICE=awss3mock
  • SPRINGTAINER_IMAGE=${embedded.container.awss3mock.docker-image}
  • SPRINGTAINER_STARTED=$currentTimestamp

Special Note

It's highly recommended to use BasicAWSCredentials with sample dates to avoid bad performance of the AWS-SDK.

Example: AmazonS3 amazonS3 = AmazonS3ClientBuilder.standard() .withCredentials(new AWSStaticCredentialsProvider(new BasicAWSCredentials("acesskey", "secretkey"))) .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(s3HttpEndpoint, Regions.EU_CENTRAL_1.getName())) .build();

The AmazonS3Helper class can be used to build AmazonS3 objects with sample credentials.

Версии библиотеки

Версия
1.0.0-RC3
1.0.0-RC2
1.0.0-RC1
0.1.0-RC5
0.1.0-RC4
0.1.0-RC3
0.1.0-RC2
0.1.0-RC1