diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 0000000..7e6c6e2
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,6 @@
+coverage:
+ status:
+ project:
+ default:
+ target: auto
+ threshold: 1%
diff --git a/.github/settings.yml b/.github/settings.yml
new file mode 100644
index 0000000..9267e7d
--- /dev/null
+++ b/.github/settings.yml
@@ -0,0 +1,2 @@
+# These settings are synced to GitHub by https://probot.github.io/apps/settings/
+_extends: .github
diff --git a/.github/workflows/basic-linters.yml b/.github/workflows/basic-linters.yml
new file mode 100644
index 0000000..6114f14
--- /dev/null
+++ b/.github/workflows/basic-linters.yml
@@ -0,0 +1,10 @@
+name: Vality basic linters
+
+on:
+ pull_request:
+ branches:
+ - "*"
+
+jobs:
+ lint:
+ uses: valitydev/base-workflows/.github/workflows/basic-linters.yml@v1
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..a654702
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,10 @@
+name: Maven Build Artifact
+
+on:
+ pull_request:
+ branches:
+ - '*'
+
+jobs:
+ build:
+ uses: valitydev/java-workflow/.github/workflows/maven-service-build.yml@v1
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..6a394b0
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,18 @@
+name: Maven Deploy Artifact
+
+on:
+ push:
+ branches:
+ - 'master'
+ - 'main'
+
+env:
+ REGISTRY: ghcr.io
+ IMAGE_NAME: ${{ github.repository }}
+
+jobs:
+ deploy:
+ uses: valitydev/java-workflow/.github/workflows/maven-service-deploy.yml@v1
+ secrets:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index ca5a761..0000000
--- a/.gitmodules
+++ /dev/null
@@ -1,4 +0,0 @@
-[submodule "build_utils"]
- path = build_utils
- url = git@github.com:rbkmoney/build_utils.git
- branch = master
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 0000000..a2af2fa
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1 @@
+* @valitydev/java
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 1e61184..0000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,16 +0,0 @@
-#!groovy
-build('file-storage', 'java-maven') {
- checkoutRepo()
- loadBuildUtils()
-
- def javaServicePipeline
- runStage('load JavaService pipeline') {
- javaServicePipeline = load("build_utils/jenkins_lib/pipeJavaService.groovy")
- }
-
- def serviceName = env.REPO_NAME
- def mvnArgs = '-DjvmArgs="-Xmx256m"'
- def useJava11 = true
-
- javaServicePipeline(serviceName, useJava11, mvnArgs)
-}
diff --git a/build_utils b/build_utils
deleted file mode 160000
index 29cb277..0000000
--- a/build_utils
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 29cb2775d05d9c18c3aa74a629459cde84a2d42e
diff --git a/docker-compose-dev.yml b/docker-compose-dev.yml
deleted file mode 100644
index cd40012..0000000
--- a/docker-compose-dev.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-version: '2.3'
-services:
- file-storage:
- build: target/
- image: file-storage:1.0.0-SNAPSHOT
- ports:
- - "8022:8022"
- depends_on:
- - ceph
- networks:
- - fsnet
- environment:
- SERVICE_NAME: "file-storage"
- storage.endpoint: "ceph:80"
- storage.signingRegion: "RU"
- storage.accessKey: "test"
- storage.secretKey: "test"
- storage.clientProtocol: "HTTP"
- storage.clientMaxErrorRetry: "10"
- storage.bucketName: "test"
-
- ceph:
- image: 'dr.rbkmoney.com/ceph-demo:latest'
- ports:
- - "32827:80"
- networks:
- - fsnet
- environment:
- - RGW_NAME=localhost
- - NETWORK_AUTO_DETECT=4
- - CEPH_DEMO_UID=ceph-test
- - CEPH_DEMO_ACCESS_KEY=test
- - CEPH_DEMO_SECRET_KEY=test
- - CEPH_DEMO_BUCKET=TEST
-
-networks:
- fsnet:
diff --git a/pom.xml b/pom.xml
index 2e16bcd..128d557 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,17 +4,17 @@
4.0.0
- com.rbkmoney
+ dev.vality
service-parent-pom
- 1.2.13
+ 1.0.16
file-storage
- 2.1.0-SNAPSHOT
+ 0.0.1-SNAPSHOT
jar
file-storage
- Service for uploading & downloading files
+ Service for uploading and downloading files
8022
@@ -26,36 +26,32 @@
-
+
- com.rbkmoney
+ dev.vality
file-storage-proto
- 1.31-d1055d3
+ 1.33-86bcf44
- com.rbkmoney.woody
+ dev.vality.woody
woody-thrift
- com.rbkmoney.geck
+ dev.vality.geck
common
- com.rbkmoney.geck
+ dev.vality.geck
serializer
- com.rbkmoney
+ dev.vality.geck
+ filter
+
+
+ dev.vality
shared-resources
-
- com.rbkmoney
- custom-metrics-spring-boot-starter
-
-
- com.rbkmoney
- custom-actuator-endpoints
-
@@ -86,7 +82,7 @@
com.amazonaws
aws-java-sdk-s3
- 1.11.587
+ 1.12.213
org.projectlombok
@@ -96,7 +92,15 @@
software.amazon.awssdk
s3
- 2.17.56
+ 2.17.181
+
+
+ io.micrometer
+ micrometer-core
+
+
+ io.micrometer
+ micrometer-registry-prometheus
@@ -104,17 +108,11 @@
org.springframework.boot
spring-boot-starter-test
test
-
-
- junit
- junit
-
-
- com.rbkmoney
+ dev.vality
testcontainers-annotations
- 1.3.1
+ 1.4.0
test
@@ -148,12 +146,24 @@
org.apache.maven.plugins
- maven-dependency-plugin
+ maven-surefire-plugin
+
+ -Dfile.encoding=UTF-8
+
+
+
+ org.apache.maven.plugins
+ maven-resources-plugin
+
+
+ p12
+
+
org.apache.maven.plugins
maven-remote-resources-plugin
- 1.6.0
+ 1.7.0
org.apache.maven.shared
@@ -163,7 +173,7 @@
- com.rbkmoney:shared-resources:${shared-resources.version}
+ dev.vality:shared-resources:${shared-resources.version}
false
false
diff --git a/renovate.json b/renovate.json
new file mode 100644
index 0000000..6f7501d
--- /dev/null
+++ b/renovate.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
+ "extends": [
+ "local>valitydev/.github:renovate-config"
+ ]
+}
diff --git a/src/main/java/com/rbkmoney/file/storage/FileStorageApplication.java b/src/main/java/dev/vality/file/storage/FileStorageApplication.java
similarity index 77%
rename from src/main/java/com/rbkmoney/file/storage/FileStorageApplication.java
rename to src/main/java/dev/vality/file/storage/FileStorageApplication.java
index cc184ae..e1a52d3 100644
--- a/src/main/java/com/rbkmoney/file/storage/FileStorageApplication.java
+++ b/src/main/java/dev/vality/file/storage/FileStorageApplication.java
@@ -1,11 +1,11 @@
-package com.rbkmoney.file.storage;
+package dev.vality.file.storage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan
-@SpringBootApplication(scanBasePackages = {"com.rbkmoney.file.storage"})
+@SpringBootApplication(scanBasePackages = {"dev.vality.file.storage"})
public class FileStorageApplication {
public static void main(String[] args) {
diff --git a/src/main/java/com/rbkmoney/file/storage/configuration/S3ClientConfig.java b/src/main/java/dev/vality/file/storage/configuration/S3ClientConfig.java
similarity index 95%
rename from src/main/java/com/rbkmoney/file/storage/configuration/S3ClientConfig.java
rename to src/main/java/dev/vality/file/storage/configuration/S3ClientConfig.java
index e2ec806..a0ff064 100644
--- a/src/main/java/com/rbkmoney/file/storage/configuration/S3ClientConfig.java
+++ b/src/main/java/dev/vality/file/storage/configuration/S3ClientConfig.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.configuration;
+package dev.vality.file.storage.configuration;
import com.amazonaws.ClientConfiguration;
import com.amazonaws.auth.AWSCredentialsProviderChain;
@@ -10,7 +10,7 @@ import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3ClientBuilder;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.TransferManagerBuilder;
-import com.rbkmoney.file.storage.configuration.properties.S3Properties;
+import dev.vality.file.storage.configuration.properties.S3Properties;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
diff --git a/src/main/java/com/rbkmoney/file/storage/configuration/S3SdkV2ClientConfig.java b/src/main/java/dev/vality/file/storage/configuration/S3SdkV2ClientConfig.java
similarity index 94%
rename from src/main/java/com/rbkmoney/file/storage/configuration/S3SdkV2ClientConfig.java
rename to src/main/java/dev/vality/file/storage/configuration/S3SdkV2ClientConfig.java
index b2c9eae..4a50e76 100644
--- a/src/main/java/com/rbkmoney/file/storage/configuration/S3SdkV2ClientConfig.java
+++ b/src/main/java/dev/vality/file/storage/configuration/S3SdkV2ClientConfig.java
@@ -1,6 +1,6 @@
-package com.rbkmoney.file.storage.configuration;
+package dev.vality.file.storage.configuration;
-import com.rbkmoney.file.storage.configuration.properties.S3SdkV2Properties;
+import dev.vality.file.storage.configuration.properties.S3SdkV2Properties;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
diff --git a/src/main/java/com/rbkmoney/file/storage/configuration/properties/S3Properties.java b/src/main/java/dev/vality/file/storage/configuration/properties/S3Properties.java
similarity index 90%
rename from src/main/java/com/rbkmoney/file/storage/configuration/properties/S3Properties.java
rename to src/main/java/dev/vality/file/storage/configuration/properties/S3Properties.java
index fbb5167..0ebcd0f 100644
--- a/src/main/java/com/rbkmoney/file/storage/configuration/properties/S3Properties.java
+++ b/src/main/java/dev/vality/file/storage/configuration/properties/S3Properties.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.configuration.properties;
+package dev.vality.file.storage.configuration.properties;
import com.amazonaws.Protocol;
import lombok.Getter;
diff --git a/src/main/java/com/rbkmoney/file/storage/configuration/properties/S3SdkV2Properties.java b/src/main/java/dev/vality/file/storage/configuration/properties/S3SdkV2Properties.java
similarity index 87%
rename from src/main/java/com/rbkmoney/file/storage/configuration/properties/S3SdkV2Properties.java
rename to src/main/java/dev/vality/file/storage/configuration/properties/S3SdkV2Properties.java
index ec90db5..8b994ea 100644
--- a/src/main/java/com/rbkmoney/file/storage/configuration/properties/S3SdkV2Properties.java
+++ b/src/main/java/dev/vality/file/storage/configuration/properties/S3SdkV2Properties.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.configuration.properties;
+package dev.vality.file.storage.configuration.properties;
import lombok.Getter;
import lombok.Setter;
diff --git a/src/main/java/com/rbkmoney/file/storage/handler/FileStorageHandler.java b/src/main/java/dev/vality/file/storage/handler/FileStorageHandler.java
similarity index 70%
rename from src/main/java/com/rbkmoney/file/storage/handler/FileStorageHandler.java
rename to src/main/java/dev/vality/file/storage/handler/FileStorageHandler.java
index e9a60cb..e2bd07e 100644
--- a/src/main/java/com/rbkmoney/file/storage/handler/FileStorageHandler.java
+++ b/src/main/java/dev/vality/file/storage/handler/FileStorageHandler.java
@@ -1,16 +1,17 @@
-package com.rbkmoney.file.storage.handler;
+package dev.vality.file.storage.handler;
-import com.rbkmoney.file.storage.FileData;
-import com.rbkmoney.file.storage.FileNotFound;
-import com.rbkmoney.file.storage.FileStorageSrv;
-import com.rbkmoney.file.storage.NewFileResult;
-import com.rbkmoney.file.storage.msgpack.Value;
-import com.rbkmoney.file.storage.service.StorageService;
-import com.rbkmoney.file.storage.service.exception.FileNotFoundException;
-import com.rbkmoney.file.storage.service.exception.StorageException;
-import com.rbkmoney.geck.common.util.TypeUtil;
-import com.rbkmoney.woody.api.flow.error.WUnavailableResultException;
-import com.rbkmoney.woody.api.flow.error.WUndefinedResultException;
+import dev.vality.file.storage.FileData;
+import dev.vality.file.storage.FileNotFound;
+import dev.vality.file.storage.FileStorageSrv;
+import dev.vality.file.storage.NewFileResult;
+import dev.vality.file.storage.msgpack.Value;
+import dev.vality.file.storage.service.StorageService;
+import dev.vality.file.storage.service.exception.FileNotFoundException;
+import dev.vality.file.storage.service.exception.StorageException;
+import dev.vality.file.storage.util.CheckerUtil;
+import dev.vality.geck.common.util.TypeUtil;
+import dev.vality.woody.api.flow.error.WUnavailableResultException;
+import dev.vality.woody.api.flow.error.WUndefinedResultException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.thrift.TException;
@@ -20,8 +21,6 @@ import java.net.URL;
import java.time.Instant;
import java.util.Map;
-import static com.rbkmoney.file.storage.util.CheckerUtil.checkString;
-
@Service
@Slf4j
@RequiredArgsConstructor
@@ -44,8 +43,8 @@ public class FileStorageHandler implements FileStorageSrv.Iface {
@Override
public String generateDownloadUrl(String fileDataId, String expiresAt) throws TException {
try {
- checkString(fileDataId, "Bad request parameter, fileDataId required and not empty arg");
- checkString(expiresAt, "Bad request parameter, expiresAt required and not empty arg");
+ CheckerUtil.checkString(fileDataId, "Bad request parameter, fileDataId required and not empty arg");
+ CheckerUtil.checkString(expiresAt, "Bad request parameter, expiresAt required and not empty arg");
Instant instant = TypeUtil.stringToInstant(expiresAt);
URL url = storageService.generateDownloadUrl(fileDataId, instant);
return url.toString();
@@ -61,7 +60,7 @@ public class FileStorageHandler implements FileStorageSrv.Iface {
@Override
public FileData getFileData(String fileDataId) throws TException {
try {
- checkString(fileDataId, "Bad request parameter, fileDataId required and not empty arg");
+ CheckerUtil.checkString(fileDataId, "Bad request parameter, fileDataId required and not empty arg");
return storageService.getFileData(fileDataId);
} catch (FileNotFoundException e) {
throw fileNotFound(e);
diff --git a/src/main/java/com/rbkmoney/file/storage/service/S3Service.java b/src/main/java/dev/vality/file/storage/service/S3Service.java
similarity index 95%
rename from src/main/java/com/rbkmoney/file/storage/service/S3Service.java
rename to src/main/java/dev/vality/file/storage/service/S3Service.java
index 74dba4b..72fa9bd 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/S3Service.java
+++ b/src/main/java/dev/vality/file/storage/service/S3Service.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.service;
+package dev.vality.file.storage.service;
import com.amazonaws.HttpMethod;
import com.amazonaws.SdkBaseException;
@@ -6,15 +6,15 @@ import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.model.*;
import com.amazonaws.services.s3.transfer.TransferManager;
import com.amazonaws.services.s3.transfer.Upload;
-import com.rbkmoney.file.storage.FileData;
-import com.rbkmoney.file.storage.NewFileResult;
-import com.rbkmoney.file.storage.configuration.properties.S3Properties;
-import com.rbkmoney.file.storage.msgpack.Value;
-import com.rbkmoney.file.storage.service.exception.ExtractMetadataException;
-import com.rbkmoney.file.storage.service.exception.FileNotFoundException;
-import com.rbkmoney.file.storage.service.exception.StorageException;
-import com.rbkmoney.file.storage.service.exception.WaitingUploadException;
-import com.rbkmoney.file.storage.util.DamselUtil;
+import dev.vality.file.storage.FileData;
+import dev.vality.file.storage.NewFileResult;
+import dev.vality.file.storage.configuration.properties.S3Properties;
+import dev.vality.file.storage.msgpack.Value;
+import dev.vality.file.storage.service.exception.ExtractMetadataException;
+import dev.vality.file.storage.service.exception.FileNotFoundException;
+import dev.vality.file.storage.service.exception.StorageException;
+import dev.vality.file.storage.service.exception.WaitingUploadException;
+import dev.vality.file.storage.util.DamselUtil;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
diff --git a/src/main/java/com/rbkmoney/file/storage/service/S3V2Service.java b/src/main/java/dev/vality/file/storage/service/S3V2Service.java
similarity index 97%
rename from src/main/java/com/rbkmoney/file/storage/service/S3V2Service.java
rename to src/main/java/dev/vality/file/storage/service/S3V2Service.java
index d4215dc..90f3d1c 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/S3V2Service.java
+++ b/src/main/java/dev/vality/file/storage/service/S3V2Service.java
@@ -1,12 +1,12 @@
-package com.rbkmoney.file.storage.service;
+package dev.vality.file.storage.service;
-import com.rbkmoney.file.storage.FileData;
-import com.rbkmoney.file.storage.NewFileResult;
-import com.rbkmoney.file.storage.configuration.properties.S3SdkV2Properties;
-import com.rbkmoney.file.storage.msgpack.Value;
-import com.rbkmoney.file.storage.service.exception.FileNotFoundException;
-import com.rbkmoney.file.storage.service.exception.StorageException;
-import com.rbkmoney.file.storage.util.DamselUtil;
+import dev.vality.file.storage.FileData;
+import dev.vality.file.storage.NewFileResult;
+import dev.vality.file.storage.configuration.properties.S3SdkV2Properties;
+import dev.vality.file.storage.msgpack.Value;
+import dev.vality.file.storage.service.exception.FileNotFoundException;
+import dev.vality.file.storage.service.exception.StorageException;
+import dev.vality.file.storage.util.DamselUtil;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
diff --git a/src/main/java/com/rbkmoney/file/storage/service/StorageService.java b/src/main/java/dev/vality/file/storage/service/StorageService.java
similarity index 63%
rename from src/main/java/com/rbkmoney/file/storage/service/StorageService.java
rename to src/main/java/dev/vality/file/storage/service/StorageService.java
index b9b6d58..1c8a0de 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/StorageService.java
+++ b/src/main/java/dev/vality/file/storage/service/StorageService.java
@@ -1,8 +1,8 @@
-package com.rbkmoney.file.storage.service;
+package dev.vality.file.storage.service;
-import com.rbkmoney.file.storage.FileData;
-import com.rbkmoney.file.storage.NewFileResult;
-import com.rbkmoney.file.storage.msgpack.Value;
+import dev.vality.file.storage.FileData;
+import dev.vality.file.storage.NewFileResult;
+import dev.vality.file.storage.msgpack.Value;
import java.net.URL;
import java.time.Instant;
diff --git a/src/main/java/com/rbkmoney/file/storage/service/exception/ExtractMetadataException.java b/src/main/java/dev/vality/file/storage/service/exception/ExtractMetadataException.java
similarity index 83%
rename from src/main/java/com/rbkmoney/file/storage/service/exception/ExtractMetadataException.java
rename to src/main/java/dev/vality/file/storage/service/exception/ExtractMetadataException.java
index 89e5b01..9d74090 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/exception/ExtractMetadataException.java
+++ b/src/main/java/dev/vality/file/storage/service/exception/ExtractMetadataException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.service.exception;
+package dev.vality.file.storage.service.exception;
public class ExtractMetadataException extends StorageException {
diff --git a/src/main/java/com/rbkmoney/file/storage/service/exception/FileNotFoundException.java b/src/main/java/dev/vality/file/storage/service/exception/FileNotFoundException.java
similarity index 82%
rename from src/main/java/com/rbkmoney/file/storage/service/exception/FileNotFoundException.java
rename to src/main/java/dev/vality/file/storage/service/exception/FileNotFoundException.java
index 2789602..f96cc6f 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/exception/FileNotFoundException.java
+++ b/src/main/java/dev/vality/file/storage/service/exception/FileNotFoundException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.service.exception;
+package dev.vality.file.storage.service.exception;
public class FileNotFoundException extends StorageException {
diff --git a/src/main/java/com/rbkmoney/file/storage/service/exception/StorageException.java b/src/main/java/dev/vality/file/storage/service/exception/StorageException.java
similarity index 81%
rename from src/main/java/com/rbkmoney/file/storage/service/exception/StorageException.java
rename to src/main/java/dev/vality/file/storage/service/exception/StorageException.java
index 80dd654..b5249b1 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/exception/StorageException.java
+++ b/src/main/java/dev/vality/file/storage/service/exception/StorageException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.service.exception;
+package dev.vality.file.storage.service.exception;
public class StorageException extends RuntimeException {
diff --git a/src/main/java/com/rbkmoney/file/storage/service/exception/WaitingUploadException.java b/src/main/java/dev/vality/file/storage/service/exception/WaitingUploadException.java
similarity index 82%
rename from src/main/java/com/rbkmoney/file/storage/service/exception/WaitingUploadException.java
rename to src/main/java/dev/vality/file/storage/service/exception/WaitingUploadException.java
index 5f7d043..d7fe1dc 100644
--- a/src/main/java/com/rbkmoney/file/storage/service/exception/WaitingUploadException.java
+++ b/src/main/java/dev/vality/file/storage/service/exception/WaitingUploadException.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.service.exception;
+package dev.vality.file.storage.service.exception;
public class WaitingUploadException extends StorageException {
diff --git a/src/main/java/com/rbkmoney/file/storage/servlet/FileStorageServlet.java b/src/main/java/dev/vality/file/storage/servlet/FileStorageServlet.java
similarity index 83%
rename from src/main/java/com/rbkmoney/file/storage/servlet/FileStorageServlet.java
rename to src/main/java/dev/vality/file/storage/servlet/FileStorageServlet.java
index b99a57b..19416f5 100644
--- a/src/main/java/com/rbkmoney/file/storage/servlet/FileStorageServlet.java
+++ b/src/main/java/dev/vality/file/storage/servlet/FileStorageServlet.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.file.storage.servlet;
+package dev.vality.file.storage.servlet;
-import com.rbkmoney.file.storage.FileStorageSrv;
-import com.rbkmoney.woody.thrift.impl.http.THServiceBuilder;
+import dev.vality.file.storage.FileStorageSrv;
+import dev.vality.woody.thrift.impl.http.THServiceBuilder;
import lombok.RequiredArgsConstructor;
import javax.servlet.*;
diff --git a/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java b/src/main/java/dev/vality/file/storage/util/CheckerUtil.java
similarity index 87%
rename from src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java
rename to src/main/java/dev/vality/file/storage/util/CheckerUtil.java
index c9cbb2f..0a308b0 100644
--- a/src/main/java/com/rbkmoney/file/storage/util/CheckerUtil.java
+++ b/src/main/java/dev/vality/file/storage/util/CheckerUtil.java
@@ -1,4 +1,4 @@
-package com.rbkmoney.file.storage.util;
+package dev.vality.file.storage.util;
import org.springframework.util.StringUtils;
diff --git a/src/main/java/com/rbkmoney/file/storage/util/DamselUtil.java b/src/main/java/dev/vality/file/storage/util/DamselUtil.java
similarity index 75%
rename from src/main/java/com/rbkmoney/file/storage/util/DamselUtil.java
rename to src/main/java/dev/vality/file/storage/util/DamselUtil.java
index 5f7e518..cd672a7 100644
--- a/src/main/java/com/rbkmoney/file/storage/util/DamselUtil.java
+++ b/src/main/java/dev/vality/file/storage/util/DamselUtil.java
@@ -1,11 +1,11 @@
-package com.rbkmoney.file.storage.util;
+package dev.vality.file.storage.util;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.rbkmoney.geck.serializer.kit.json.JsonHandler;
-import com.rbkmoney.geck.serializer.kit.json.JsonProcessor;
-import com.rbkmoney.geck.serializer.kit.tbase.TBaseHandler;
-import com.rbkmoney.geck.serializer.kit.tbase.TBaseProcessor;
+import dev.vality.geck.serializer.kit.json.JsonHandler;
+import dev.vality.geck.serializer.kit.json.JsonProcessor;
+import dev.vality.geck.serializer.kit.tbase.TBaseHandler;
+import dev.vality.geck.serializer.kit.tbase.TBaseProcessor;
import org.apache.thrift.TBase;
import java.io.IOException;
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 8157b38..1b0ccce 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,24 +1,23 @@
info:
- version: @project.version@
+ version: '@project.version@'
stage: dev
server:
- port: @server.port@
+ port: '@server.port@'
management:
- security:
- flag: false
server:
- port: @management.port@
+ port: '@management.port@'
metrics:
export:
- statsd:
- flavor: etsy
- enabled: false
prometheus:
enabled: false
+ tags:
+ application: '@project.name@'
endpoint:
health:
+ probes:
+ enabled: true
show-details: always
metrics:
enabled: true
@@ -31,7 +30,7 @@ management:
spring:
application:
- name: @project.name@
+ name: '@project.name@'
output:
ansi:
enabled: always
diff --git a/src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithMinio.java b/src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithMinio.java
deleted file mode 100644
index 71ee510..0000000
--- a/src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithMinio.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.rbkmoney.file.storage.awssdks3v2;
-
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.minio.MinioTestcontainerSingleton;
-
-@MinioTestcontainerSingleton(
- properties = "s3-sdk-v2.enabled=true",
- bucketName = "awssdks3v2")
-public class WithMinio extends FileStorageTest {
-}
diff --git a/src/test/java/com/rbkmoney/file/storage/s3signer/WithCeph.java b/src/test/java/com/rbkmoney/file/storage/s3signer/WithCeph.java
deleted file mode 100644
index e506318..0000000
--- a/src/test/java/com/rbkmoney/file/storage/s3signer/WithCeph.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.file.storage.s3signer;
-
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.ceph.CephTestcontainerSingleton;
-
-@CephTestcontainerSingleton(bucketName = "s3signer")
-public class WithCeph extends FileStorageTest {
-}
diff --git a/src/test/java/com/rbkmoney/file/storage/s3signer/WithMinio.java b/src/test/java/com/rbkmoney/file/storage/s3signer/WithMinio.java
deleted file mode 100644
index 2e19014..0000000
--- a/src/test/java/com/rbkmoney/file/storage/s3signer/WithMinio.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package com.rbkmoney.file.storage.s3signer;
-
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.minio.MinioTestcontainerSingleton;
-
-@MinioTestcontainerSingleton(bucketName = "s3signer")
-public class WithMinio extends FileStorageTest {
-}
diff --git a/src/test/java/com/rbkmoney/file/storage/CatchExceptionsTest.java b/src/test/java/dev/vality/file/storage/CatchExceptionsTest.java
similarity index 89%
rename from src/test/java/com/rbkmoney/file/storage/CatchExceptionsTest.java
rename to src/test/java/dev/vality/file/storage/CatchExceptionsTest.java
index 078087f..9fe739e 100644
--- a/src/test/java/com/rbkmoney/file/storage/CatchExceptionsTest.java
+++ b/src/test/java/dev/vality/file/storage/CatchExceptionsTest.java
@@ -1,10 +1,10 @@
-package com.rbkmoney.file.storage;
+package dev.vality.file.storage;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.transfer.TransferManager;
-import com.rbkmoney.woody.api.flow.error.WRuntimeException;
-import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
+import dev.vality.woody.api.flow.error.WRuntimeException;
+import dev.vality.woody.thrift.impl.http.THSpawnClientBuilder;
import org.apache.thrift.TException;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
diff --git a/src/test/java/com/rbkmoney/file/storage/FileStorageTest.java b/src/test/java/dev/vality/file/storage/FileStorageTest.java
similarity index 95%
rename from src/test/java/com/rbkmoney/file/storage/FileStorageTest.java
rename to src/test/java/dev/vality/file/storage/FileStorageTest.java
index 6339bf6..8386bce 100644
--- a/src/test/java/com/rbkmoney/file/storage/FileStorageTest.java
+++ b/src/test/java/dev/vality/file/storage/FileStorageTest.java
@@ -1,6 +1,6 @@
-package com.rbkmoney.file.storage;
+package dev.vality.file.storage;
-import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder;
+import dev.vality.woody.thrift.impl.http.THSpawnClientBuilder;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
@@ -30,8 +30,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import static com.rbkmoney.file.storage.msgpack.Value.*;
-import static com.rbkmoney.testcontainers.annotations.util.ValuesGenerator.*;
+import static dev.vality.file.storage.msgpack.Value.*;
+import static dev.vality.testcontainers.annotations.util.ValuesGenerator.*;
import static org.junit.jupiter.api.Assertions.*;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@@ -59,9 +59,9 @@ public abstract class FileStorageTest {
@Test
public void fileUploadWithHttpClientBuilderTest() throws IOException, URISyntaxException, TException {
String expirationTime = generateCurrentTimePlusDay().toString();
- Map metadata = new HashMap<>();
- metadata.put("author", com.rbkmoney.file.storage.msgpack.Value.str("Mary Doe"));
- metadata.put("version", com.rbkmoney.file.storage.msgpack.Value.str("1.0.0.0"));
+ Map metadata = new HashMap<>();
+ metadata.put("author", dev.vality.file.storage.msgpack.Value.str("Mary Doe"));
+ metadata.put("version", dev.vality.file.storage.msgpack.Value.str("1.0.0.0"));
NewFileResult fileResult = fileStorageClient.createNewFile(metadata, expirationTime);
@@ -94,9 +94,9 @@ public abstract class FileStorageTest {
try {
// создание нового файла
String expirationTime = generateCurrentTimePlusDay().toString();
- Map metadata = new HashMap<>();
- metadata.put("author", com.rbkmoney.file.storage.msgpack.Value.str("Mary Doe"));
- metadata.put("version", com.rbkmoney.file.storage.msgpack.Value.str("1.0.0.0"));
+ Map metadata = new HashMap<>();
+ metadata.put("author", dev.vality.file.storage.msgpack.Value.str("Mary Doe"));
+ metadata.put("version", dev.vality.file.storage.msgpack.Value.str("1.0.0.0"));
NewFileResult fileResult = fileStorageClient.createNewFile(metadata, expirationTime);
uploadTestData(fileResult, FILE_NAME, FILE_DATA);
diff --git a/src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithCeph.java b/src/test/java/dev/vality/file/storage/awssdks3v2/WithCeph.java
similarity index 52%
rename from src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithCeph.java
rename to src/test/java/dev/vality/file/storage/awssdks3v2/WithCeph.java
index ab2ec84..28e34a6 100644
--- a/src/test/java/com/rbkmoney/file/storage/awssdks3v2/WithCeph.java
+++ b/src/test/java/dev/vality/file/storage/awssdks3v2/WithCeph.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.file.storage.awssdks3v2;
+package dev.vality.file.storage.awssdks3v2;
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.ceph.CephTestcontainerSingleton;
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
@CephTestcontainerSingleton(
properties = {"s3-sdk-v2.enabled=true", "s3-sdk-v2.region=us-east-1"},
diff --git a/src/test/java/dev/vality/file/storage/awssdks3v2/WithMinio.java b/src/test/java/dev/vality/file/storage/awssdks3v2/WithMinio.java
new file mode 100644
index 0000000..ca3c4c7
--- /dev/null
+++ b/src/test/java/dev/vality/file/storage/awssdks3v2/WithMinio.java
@@ -0,0 +1,10 @@
+package dev.vality.file.storage.awssdks3v2;
+
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
+
+@MinioTestcontainerSingleton(
+ properties = "s3-sdk-v2.enabled=true",
+ bucketName = "awssdks3v2")
+public class WithMinio extends FileStorageTest {
+}
diff --git a/src/test/java/dev/vality/file/storage/s3signer/WithCeph.java b/src/test/java/dev/vality/file/storage/s3signer/WithCeph.java
new file mode 100644
index 0000000..e099a9a
--- /dev/null
+++ b/src/test/java/dev/vality/file/storage/s3signer/WithCeph.java
@@ -0,0 +1,8 @@
+package dev.vality.file.storage.s3signer;
+
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
+
+@CephTestcontainerSingleton(bucketName = "s3signer")
+public class WithCeph extends FileStorageTest {
+}
diff --git a/src/test/java/dev/vality/file/storage/s3signer/WithMinio.java b/src/test/java/dev/vality/file/storage/s3signer/WithMinio.java
new file mode 100644
index 0000000..d1a941f
--- /dev/null
+++ b/src/test/java/dev/vality/file/storage/s3signer/WithMinio.java
@@ -0,0 +1,8 @@
+package dev.vality.file.storage.s3signer;
+
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
+
+@MinioTestcontainerSingleton(bucketName = "s3signer")
+public class WithMinio extends FileStorageTest {
+}
diff --git a/src/test/java/com/rbkmoney/file/storage/s3v4signer/WithCeph.java b/src/test/java/dev/vality/file/storage/s3v4signer/WithCeph.java
similarity index 50%
rename from src/test/java/com/rbkmoney/file/storage/s3v4signer/WithCeph.java
rename to src/test/java/dev/vality/file/storage/s3v4signer/WithCeph.java
index 4eebbcf..9079075 100644
--- a/src/test/java/com/rbkmoney/file/storage/s3v4signer/WithCeph.java
+++ b/src/test/java/dev/vality/file/storage/s3v4signer/WithCeph.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.file.storage.s3v4signer;
+package dev.vality.file.storage.s3v4signer;
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.ceph.CephTestcontainerSingleton;
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.ceph.CephTestcontainerSingleton;
@CephTestcontainerSingleton(
properties = "s3.signer-override=AWSS3V4SignerType",
diff --git a/src/test/java/com/rbkmoney/file/storage/s3v4signer/WithMinio.java b/src/test/java/dev/vality/file/storage/s3v4signer/WithMinio.java
similarity index 50%
rename from src/test/java/com/rbkmoney/file/storage/s3v4signer/WithMinio.java
rename to src/test/java/dev/vality/file/storage/s3v4signer/WithMinio.java
index 3bfd349..78fafa3 100644
--- a/src/test/java/com/rbkmoney/file/storage/s3v4signer/WithMinio.java
+++ b/src/test/java/dev/vality/file/storage/s3v4signer/WithMinio.java
@@ -1,7 +1,7 @@
-package com.rbkmoney.file.storage.s3v4signer;
+package dev.vality.file.storage.s3v4signer;
-import com.rbkmoney.file.storage.FileStorageTest;
-import com.rbkmoney.testcontainers.annotations.minio.MinioTestcontainerSingleton;
+import dev.vality.file.storage.FileStorageTest;
+import dev.vality.testcontainers.annotations.minio.MinioTestcontainerSingleton;
@MinioTestcontainerSingleton(
properties = "s3.signer-override=AWSS3V4SignerType",
diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml
deleted file mode 100644
index caf750c..0000000
--- a/src/test/resources/logback-test.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-