remove test properties; use token

This commit is contained in:
gulnaz 2025-03-10 14:09:47 +03:00
parent 65e998f5af
commit f527b92827
2 changed files with 2 additions and 11 deletions

View file

@ -11,7 +11,6 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -51,10 +50,6 @@ public class AdminController {
@Value("${ervu.url}")
private String ervuUrl;
@Value("${test.user.id:}")
private String testUserId;
@Value("${test.token:}")
private String testToken;
public AdminController(RestTemplate restTemplate, SecurityContext securityContext) {
this.restTemplate = restTemplate;
@ -116,12 +111,10 @@ public class AdminController {
}
private String getUserId() {
//TODO remove after test
return StringUtils.hasText(testUserId) ? testUserId : securityContext.getUserId();
return securityContext.getUserId();
}
//TODO after SUPPORT-8975
private String getToken() {
return StringUtils.hasText(testToken) ? testToken : securityContext.getUserId(); //TODO take token after SUPPORT-8975 merge
return securityContext.getToken();
}
}

View file

@ -13,6 +13,4 @@ DB_SEC_PORT=5432
DB_SEC_NAME=account_applications
ERVU_URL=https://ervu-uat.test.gosuslugi.ru
TEST_USER_ID=
TEST_TOKEN=
ERVU_HTTP_TIMEOUT=