From fbb47767c38fd470e992b9efbe7eefeda299804e Mon Sep 17 00:00:00 2001
From: petruki <31597636+petruki@users.noreply.github.com>
Date: Mon, 2 Jun 2025 22:16:33 -0700
Subject: [PATCH 1/2] Removed DBRef for retrocompatibility with latest AC
versions
---
pom.xml | 12 ++++-
.../ac/controller/AdminController.java | 4 +-
.../switcherapi/ac/model/domain/Account.java | 4 +-
.../ac/model/mapper/AccountMapper.java | 9 ++--
.../switcherapi/ac/repository/AccountDao.java | 2 +-
.../ac/service/AccountService.java | 12 ++---
.../ac/service/ValidatorBasicService.java | 16 +++----
.../validator/AbstractValidatorService.java | 6 ++-
.../validator/ValidatorBuilderService.java | 6 ++-
.../validator/ValidatorNativeBuilder.java | 7 +--
.../validator/ValidatorRuntimeBuilder.java | 9 ++--
.../beans/AbstractActiveCheckValidator.java | 5 ++-
.../validator/beans/ValidateRateLimit.java | 8 ++--
.../github/switcherapi/ac/PlanUtilsTests.java | 3 ++
.../AdminAccountControllerTests.java | 23 ++++++----
.../controller/AdminAuthControllerTests.java | 13 ++++--
.../AdminGitHubAuthControllerTests.java | 8 +++-
.../AdminPlanControllerErrorTests.java | 5 ++-
.../ac/controller/ApiControllerTests.java | 3 ++
.../ac/controller/ApiResourcesTests.java | 3 ++
.../ac/controller/PlanControllerTests.java | 5 ++-
...tcherRelayCacheLimiterControllerTests.java | 3 ++
.../SwitcherRelayControllerErrorTests.java | 2 +-
.../SwitcherRelayControllerTests.java | 18 +++++++-
.../fixture/ControllerTestUtils.java | 44 +++++++++++++++----
.../ac/service/AccountServiceTest.java | 9 +++-
.../ac/service/GitHubServiceTest.java | 3 ++
.../ac/service/ValidatorBasicServiceTest.java | 3 ++
.../ValidatorNativeBuilderServiceTest.java | 3 ++
.../ValidatorRuntimeBuilderServiceTest.java | 3 ++
.../switcherapi/ac/util/FileUtilTest.java | 3 ++
.../switcherapi/ac/util/SanitizerTest.java | 3 ++
.../nativeimage/NativeReflectConfigTest.java | 3 ++
src/test/resources/junit-platform.properties | 3 ++
34 files changed, 196 insertions(+), 67 deletions(-)
create mode 100644 src/test/resources/junit-platform.properties
diff --git a/pom.xml b/pom.xml
index e522fde..07520c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
com.github.switcherac
switcher-ac
- 1.0.10
+ 1.1.0-SNAPSHOT
Switcher Account Control
Account Control Service for Switcher API
@@ -71,6 +71,7 @@
0.10.6
3.14.0
+ 3.5.3
5.1.0.4751
0.8.13
@@ -317,6 +318,15 @@
org.springframework.boot
spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ ${maven-surefire-plugin.version}
+
+ suites
+
+
diff --git a/src/main/java/com/github/switcherapi/ac/controller/AdminController.java b/src/main/java/com/github/switcherapi/ac/controller/AdminController.java
index f305fe5..f6bd78f 100644
--- a/src/main/java/com/github/switcherapi/ac/controller/AdminController.java
+++ b/src/main/java/com/github/switcherapi/ac/controller/AdminController.java
@@ -2,7 +2,6 @@
import com.github.switcherapi.ac.model.dto.AccountDTO;
import com.github.switcherapi.ac.model.dto.GitHubAuthDTO;
-import com.github.switcherapi.ac.model.mapper.AccountMapper;
import com.github.switcherapi.ac.service.AccountService;
import com.github.switcherapi.ac.service.AdminService;
import io.swagger.v3.oas.annotations.Operation;
@@ -51,8 +50,7 @@ public ResponseEntity