Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DTSAM-492 Decommission Launch Darkly #2334

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c7fec34
DTSAM-492 Decommission Launch Darkly - created EnvironmentConfigurati…
mikebrownccd Sep 12, 2024
ca6506b
ras.environment property populated by RAS_ENV added to application.yaml
mikebrownccd Sep 12, 2024
cf0f7d3
EnvironmentConfiguration bean now configured in getEnvironmentConfigu…
mikebrownccd Sep 12, 2024
1380321
advance_delete_api_flag logic removed and FeatureToggles from tests
mikebrownccd Sep 12, 2024
30b5800
testing.support.enabled property added to FeatureFlagController, TEST…
mikebrownccd Sep 12, 2024
df17452
Bumping chart version/ fixing aliases
hmcts-jenkins-a-to-c[bot] Sep 12, 2024
9886679
get-db-drools-flag refs removed from FeatureToggleService, removed Fe…
mikebrownccd Sep 12, 2024
91a779e
Merge remote-tracking branch 'origin/DTSAM-492_Decommission_Launch_Da…
mikebrownccd Sep 12, 2024
e1a1851
FeatureConditionEvaluation interceptors for createFeatureFlag and fet…
mikebrownccd Sep 13, 2024
d48d9a4
get-ld-flag feature toggle refs removed as well as obsolute FTAs @S-1…
mikebrownccd Sep 13, 2024
17ffe9d
removed FeatureConditionEvaluation and refs
mikebrownccd Sep 13, 2024
40263b9
removed LD FeatureToggleService and LaunchDarklyConfiguration + refs,…
mikebrownccd Sep 13, 2024
6962b45
removed LDDummyClient
mikebrownccd Sep 13, 2024
74fd68c
launchdarkly key and user properties removed, LD secrets removed, RUN…
mikebrownccd Sep 13, 2024
74b30c3
commented code removed
mikebrownccd Sep 13, 2024
0702c13
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Sep 17, 2024
68afa5b
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Sep 25, 2024
6c61d16
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Sep 26, 2024
271d7f7
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Sep 30, 2024
0a004af
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Oct 2, 2024
cc33af7
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Oct 10, 2024
aa67ef5
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Oct 14, 2024
b950c89
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Oct 18, 2024
7064b02
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Oct 23, 2024
0ca433c
tests fixed after branch update
mikebrownccd Oct 23, 2024
47baab5
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Nov 5, 2024
408c075
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Nov 11, 2024
997a036
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Nov 12, 2024
699d0a2
Update CreateRoleAssignmentProviderTest.java
mikebrownccd Nov 12, 2024
cad7932
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Nov 19, 2024
7026183
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
mikebrownccd Nov 21, 2024
6e37407
Merge branch 'master' into DTSAM-492_Decommission_Launch_Darkly
prashanthnerligeb Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def secrets = [
],
'am-${env}': [
secret('role-assignment-service-IDAM-CLIENT-SECRET', 'ROLE_ASSIGNMENT_IDAM_CLIENT_SECRET'),
secret('role-assignment-service-LD-SDK-KEY', 'LD_SDK_KEY'),
secret('test-am-user1-befta-pwd', 'TEST_AM_USER1_BEFTA_PWD'),
secret('test-am-user2-befta-pwd', 'TEST_AM_USER2_BEFTA_PWD'),
secret('test-am-user3-befta-pwd', 'TEST_AM_USER3_BEFTA_PWD'),
Expand Down Expand Up @@ -92,13 +91,13 @@ withPipeline(type, product, component) {
enableSlackNotifications('#am-master-builds')
}
if (env.BRANCH_NAME.startsWith("PR")) {
env.LAUNCH_DARKLY_ENV = "pr"
env.RAS_ENV = "pr"
}
else if(env.BRANCH_NAME == 'master') {
env.LAUNCH_DARKLY_ENV = "aat"
env.RAS_ENV = "aat"
}
else {
env.LAUNCH_DARKLY_ENV = env.BRANCH_NAME
env.RAS_ENV = env.BRANCH_NAME
}

onPR {
Expand Down
7 changes: 3 additions & 4 deletions Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def secrets = [
],
'am-${env}': [
secret('role-assignment-service-IDAM-CLIENT-SECRET', 'ROLE_ASSIGNMENT_IDAM_CLIENT_SECRET'),
secret('role-assignment-service-LD-SDK-KEY', 'LD_SDK_KEY'),
secret('test-am-user1-befta-pwd', 'TEST_AM_USER1_BEFTA_PWD'),
secret('test-am-user2-befta-pwd', 'TEST_AM_USER2_BEFTA_PWD'),
secret('test-am-user3-befta-pwd', 'TEST_AM_USER3_BEFTA_PWD'),
Expand All @@ -52,13 +51,13 @@ def vaultOverrides = [

withNightlyPipeline(type, product, component) {
if (env.BRANCH_NAME.startsWith("PR")) {
env.LAUNCH_DARKLY_ENV = "pr"
env.RAS_ENV = "pr"
}
else if (env.BRANCH_NAME == 'master') {
env.LAUNCH_DARKLY_ENV = "aat"
env.RAS_ENV = "aat"
}
else {
env.LAUNCH_DARKLY_ENV = env.BRANCH_NAME
env.RAS_ENV = env.BRANCH_NAME
}

env.IDAM_URL = "https://idam-api.aat.platform.hmcts.net"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following environment variables are required:
|ROLE_ASSIGNMENT_IDAM_ADMIN_PASSWORD|Pa55word11|
|ROLE_ASSIGNMENT_IDAM_ADMIN_SCOPE|search-user|
|CCD_DATA_STORE_URL|http://localhost:4452|
|LAUNCH_DARKLY_ENV|local|
|RAS_ENV|local|
|LD_SDK_KEY|"Please contact the AM team for getting this key"|

## Building the application
Expand Down
2 changes: 1 addition & 1 deletion charts/am-role-assignment-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "1.0"
description: A Helm chart for Role Assignment Service
name: am-role-assignment-service
home: https://github.com/hmcts/am-role-assignment-service
version: 0.0.80
version: 0.0.81
maintainers:
- name: Access Management Team
dependencies:
Expand Down
1 change: 1 addition & 0 deletions charts/am-role-assignment-service/values.aat.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ java:
environment:
BYPASS_ORG_DROOL_RULE: true
RUN_DB_MIGRATION_ON_STARTUP: true
TESTING_SUPPORT_ENABLED: true
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ java:
alias: ROLE_ASSIGNMENT_IDAM_CLIENT_SECRET
- name: role-assignment-service-IDAM-ADMIN-SECRET
alias: ROLE_ASSIGNMENT_IDAM_ADMIN_PASSWORD
- name: role-assignment-service-LD-SDK-KEY
alias: LD_SDK_KEY
# overidding dev memory and cpu limits to make it match with standard limits
# https://github.com/hmcts/chart-java/blob/master/java/values.yaml
devmemoryRequests: 1024Mi
Expand All @@ -30,12 +28,12 @@ java:
ROLE_ASSIGNMENT_DB_OPTIONS: "?stringtype=unspecified"
CCD_DATA_STORE_URL: http://ccd-data-store-api-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
S2S_URL: http://rpe-service-auth-provider-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
LAUNCH_DARKLY_ENV: pr
RAS_ENV: pr
ENABLE_DB_MIGRATE: true
BYPASS_ORG_DROOL_RULE: true
RUN_DB_MIGRATION_ON_STARTUP: true
RUN_LD_ON_STARTUP: true
APPLICATION_LOGGING_LEVEL: DEBUG
TESTING_SUPPORT_ENABLED: true
postgresql:
enabled: true
postgresqlPort: 5432
6 changes: 2 additions & 4 deletions charts/am-role-assignment-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ java:
alias: ROLE_ASSIGNMENT_IDAM_CLIENT_SECRET
- name: role-assignment-service-IDAM-ADMIN-SECRET
alias: ROLE_ASSIGNMENT_IDAM_ADMIN_PASSWORD
- name: role-assignment-service-LD-SDK-KEY
alias: LD_SDK_KEY
environment:
IDAM_S2S_URL: http://rpe-service-auth-provider-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
IDAM_USER_URL: https://idam-api.{{ .Values.global.environment }}.platform.hmcts.net
Expand All @@ -37,7 +35,7 @@ java:
S2S_URL: http://rpe-service-auth-provider-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
OIDC_ISSUER_URL: https://forgerock-am.service.core-compute-idam-{{ .Values.global.environment }}.internal:8443/openam/oauth2/hmcts
OPEN_ID_API_BASE_URI: https://idam-web-public.{{ .Values.global.environment }}.platform.hmcts.net/o
LAUNCH_DARKLY_ENV: "{{ .Values.global.environment }}"
RAS_ENV: "{{ .Values.global.environment }}"
ROLE_ASSIGNMENT_IDAM_CLIENT_ID: am_role_assignment
MICROSERVICE_NAME: am_role_assignment_service
PACT_BROKER_FULL_URL: https://pact-broker.platform.hmcts.net
Expand All @@ -49,4 +47,4 @@ java:
APPLICATION_LOGGING_LEVEL: INFO
BYPASS_ORG_DROOL_RULE: false
RUN_DB_MIGRATION_ON_STARTUP: false
RUN_LD_ON_STARTUP: true
TESTING_SUPPORT_ENABLED: false
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
host = "${PACT_BROKER_URL:localhost}", port = "${PACT_BROKER_PORT:9292}", consumerVersionSelectors = {
@VersionSelector(tag = "master")})
@TestPropertySource(properties = {"org.request.byPassOrgDroolRule=true", "roleassignment.query.size=20",
"spring.cache.type=none", "launchdarkly.sdk.environment=pr", "roleassignment.query.sizeinternal=100"})
"spring.cache.type=none", "ras.environment=pr", "roleassignment.query.sizeinternal=100"})
@Import(RoleAssignmentProviderTestConfiguration.class)
@IgnoreNoPactsToVerify
public class CreateRoleAssignmentProviderTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
@PactBroker(scheme = "${PACT_BROKER_SCHEME:http}",
host = "${PACT_BROKER_URL:localhost}", port = "${PACT_BROKER_PORT:9292}", consumerVersionSelectors = {
@VersionSelector(tag = "master")})
@TestPropertySource(properties = {"roleassignment.query.size=20", "launchdarkly.sdk.environment=pr",
@TestPropertySource(properties = {"roleassignment.query.size=20", "ras.environment=pr",
"spring.cache.type=none", "roleassignment.query.sizeinternal=100"})
@Import(RoleAssignmentProviderTestConfiguration.class)
@IgnoreNoPactsToVerify
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.StatelessKieSession;
import org.mockito.Mockito;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.boot.test.mock.mockito.MockBean;
import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import uk.gov.hmcts.reform.roleassignment.config.EnvironmentConfiguration;
import uk.gov.hmcts.reform.roleassignment.domain.service.common.ParseRequestService;
import uk.gov.hmcts.reform.roleassignment.domain.service.common.PersistenceService;
import uk.gov.hmcts.reform.roleassignment.domain.service.common.PrepareResponseService;
Expand All @@ -22,6 +24,8 @@
import uk.gov.hmcts.reform.roleassignment.util.PersistenceUtil;
import uk.gov.hmcts.reform.roleassignment.util.SecurityUtils;

import static org.mockito.Mockito.when;

@TestConfiguration
public class RoleAssignmentProviderTestConfiguration {

Expand Down Expand Up @@ -112,4 +116,12 @@ public DeleteRoleAssignmentOrchestrator deleteRoleAssignment() {
);
}

@Bean
@Primary
public EnvironmentConfiguration getEnvironmentConfiguration() {
EnvironmentConfiguration environmentConfiguration = Mockito.mock(EnvironmentConfiguration.class);
when(environmentConfiguration.getEnvironment()).thenReturn("pr");
return environmentConfiguration;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class RasDefaultMultiSourceFeatureToggleService extends DefaultMultiSourc
@SuppressWarnings("unchecked")
public ScenarioFeatureToggleInfo getToggleStatusFor(Scenario toggleable) {
ScenarioFeatureToggleInfo scenarioFeatureToggleInfo = new ScenarioFeatureToggleInfo();
//@FeatureToggle(LD:feature_id_1=on) @FeatureToggle(RAS:feature_id_2=off)
// @FeatureToggle(RAS:feature_id_2=off)
toggleable.getSourceTagNames().stream().filter(tag -> tag.contains(LAUNCH_DARKLY_FLAG)).forEach(tag -> {
String domain = null;
String id = null;
Expand Down
21 changes: 0 additions & 21 deletions src/functionalTest/resources/features/F-000/F-000.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,6 @@ Feature: F-000 : Access Role Assignment API
Given an appropriate test context as detailed in the test data source

@S-000
@FeatureToggle(get-ld-flag)
Scenario: must access Role Assignment API
Given a user with [an active caseworker profile],
When a request is prepared with appropriate values,
And the request [is to be made on behalf of Role Assignment API],
And it is submitted to call the [Access Role Assignment API] operation of [Role Assignment API],
Then a positive response is received,
And the response has all other details as expected.

@S-120
@FeatureToggle(LD:get-ld-flag=on)
Scenario: must access Role Assignment API
Given a user with [an active caseworker profile],
When a request is prepared with appropriate values,
And the request [is to be made on behalf of Role Assignment API],
And it is submitted to call the [Access Role Assignment API] operation of [Role Assignment API],
Then a positive response is received,
And the response has all other details as expected.

@S-110
@FeatureToggle(LD:get-ld-flag=off)
Scenario: must access Role Assignment API
Given a user with [an active caseworker profile],
When a request is prepared with appropriate values,
Expand Down
5 changes: 0 additions & 5 deletions src/functionalTest/resources/features/F-010/F-010.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Feature: F-010 : Post Role Assignments Delete Query Request
Given an appropriate test context as detailed in the test data source

@S-190
@FeatureToggle(advance_delete_api_flag)
Scenario: must successfully delete list of multiple queries
Given a user with [an active IDAM profile with full permissions],
And a successful call [to create org role assignments for actors & requester] as in [S-190_Multiple_Org_Role_Creation],
Expand All @@ -19,7 +18,6 @@ Feature: F-010 : Post Role Assignments Delete Query Request
And a successful call [to delete role assignments just created above] as in [S-190_DeleteDataForRoleAssignmentsForOrgRoles].

@S-191
@FeatureToggle(advance_delete_api_flag)
Scenario: must successfully delete single Query Request
Given a user with [an active IDAM profile with full permissions],
And a successful call [to create org role assignments for actors & requester] as in [S-191_Multiple_Org_Role_Creation],
Expand All @@ -32,7 +30,6 @@ Feature: F-010 : Post Role Assignments Delete Query Request
And a successful call [to delete role assignments just created above] as in [S-191_DeleteDataForRoleAssignmentsForOrgRoles].

@S-192
@FeatureToggle(advance_delete_api_flag)
Scenario: must successfully delete role assignments without correlation Id
Given a user with [an active IDAM profile with full permissions],
And a successful call [to create org role assignments for actors & requester] as in [S-192_Multiple_Org_Role_Creation],
Expand All @@ -45,7 +42,6 @@ Feature: F-010 : Post Role Assignments Delete Query Request
And a successful call [to delete role assignments just created above] as in [S-192_DeleteDataForRoleAssignmentsForOrgRoles].

@S-193
@FeatureToggle(advance_delete_api_flag)
Scenario: must receive a positive response when trying to delete Role Assignments twice
Given a user with [an active IDAM profile with full permissions],
And a successful call [to create org role assignments for actors & requester] as in [S-193_Multiple_Org_Role_Creation],
Expand All @@ -62,7 +58,6 @@ Feature: F-010 : Post Role Assignments Delete Query Request
#env.BEFTA_RESPONSE_HEADER_CHECK_POLICY = "JUST_WARN"
#So commenting out this scenario
# @S-194
# @FeatureToggle(advance_delete_api_flag)
# Scenario: must successfully receive the delete records count in headers
# Given a user with [an active IDAM profile with full permissions],
# And a successful call [to create org role assignments for actors & requester] as in [S-106_Multiple_Org_Role_Creation],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext;
Expand All @@ -21,6 +22,7 @@
* Each run of workflow .github/workflows/swagger.yml on master should automatically save and upload (if updated)
* documentation.
*/
@TestPropertySource(properties = {"ras.environment=pr"})
public class SwaggerPublisher extends BaseTest {

private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import uk.gov.hmcts.reform.roleassignment.domain.service.common.RetrieveDataService;
import uk.gov.hmcts.reform.roleassignment.domain.service.security.IdamRoleService;
import uk.gov.hmcts.reform.roleassignment.helper.TestDataBuilder;
import uk.gov.hmcts.reform.roleassignment.launchdarkly.FeatureConditionEvaluation;
import uk.gov.hmcts.reform.roleassignment.oidc.IdamRepository;
import uk.gov.hmcts.reform.roleassignment.util.Constants;

Expand All @@ -39,7 +38,6 @@

import java.util.List;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
Expand All @@ -52,7 +50,8 @@
import static uk.gov.hmcts.reform.roleassignment.helper.TestDataBuilder.getRequestedOrgRole;
import static uk.gov.hmcts.reform.roleassignment.util.JacksonUtils.convertValueJsonNode;

@TestPropertySource(properties = {"org.request.byPassOrgDroolRule=false", "dbFeature.flags.enable=iac_jrd_1_0"})
@TestPropertySource(properties = {"org.request.byPassOrgDroolRule=false", "dbFeature.flags.enable=iac_jrd_1_0",
"ras.environment=pr"})
public class DroolPassAssignmentCreateAndDeleteIntegrationTest extends BaseTest {

private static final Logger logger =
Expand Down Expand Up @@ -83,9 +82,6 @@ public class DroolPassAssignmentCreateAndDeleteIntegrationTest extends BaseTest
@MockBean
private IdamRoleService idamRoleService;

@MockBean
private FeatureConditionEvaluation featureConditionEvaluation;

@Before
public void setUp() throws Exception {

Expand All @@ -100,7 +96,6 @@ public void setUp() throws Exception {
doReturn(roles).when(idamRoleService).getUserRoles(anyString());
doReturn(authentication).when(securityContext).getAuthentication();
SecurityContextHolder.setContext(securityContext);
doReturn(true).when(featureConditionEvaluation).preHandle(any(),any(),any());
MockUtils.setSecurityAuthorities(authentication, MockUtils.ROLE_CASEWORKER);
UserInfo userInfo = UserInfo.builder()
.uid("6b36bfc6-bb21-11ea-b3de-0242ac130006")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

@TestPropertySource(properties = {"launchdarkly.sdk.environment=pr"})
@TestPropertySource(properties = {"ras.environment=pr"})
public class QueryAssignmentIntegrationTest extends BaseTest {

private static final Logger logger = LoggerFactory.getLogger(RoleAssignmentIntegrationTest.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import uk.gov.hmcts.reform.roleassignment.domain.service.common.RetrieveDataService;
import uk.gov.hmcts.reform.roleassignment.domain.service.security.IdamRoleService;
import uk.gov.hmcts.reform.roleassignment.helper.TestDataBuilder;
import uk.gov.hmcts.reform.roleassignment.launchdarkly.FeatureConditionEvaluation;
import uk.gov.hmcts.reform.roleassignment.util.Constants;

import javax.inject.Inject;
Expand All @@ -40,7 +39,6 @@

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.springframework.http.HttpHeaders.AUTHORIZATION;
Expand All @@ -49,7 +47,7 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static uk.gov.hmcts.reform.roleassignment.domain.model.enums.Status.CREATE_REQUESTED;

@TestPropertySource(properties = {"dbFeature.flags.enable=iac_jrd_1_0"})
@TestPropertySource(properties = {"dbFeature.flags.enable=iac_jrd_1_0", "ras.environment=pr"})
public class RoleAssignmentCreateAndDeleteIntegrationTest extends BaseTest {

private static final Logger logger = LoggerFactory.getLogger(RoleAssignmentCreateAndDeleteIntegrationTest.class);
Expand Down Expand Up @@ -96,9 +94,6 @@ public class RoleAssignmentCreateAndDeleteIntegrationTest extends BaseTest {
@MockBean
private IdamRoleService idamRoleService;

@MockBean
private FeatureConditionEvaluation featureConditionEvaluation;

@Before
public void setUp() throws Exception {
template = new JdbcTemplate(ds);
Expand All @@ -113,7 +108,6 @@ public void setUp() throws Exception {
doReturn(roles).when(idamRoleService).getUserRoles(anyString());
doReturn(authentication).when(securityContext).getAuthentication();
SecurityContextHolder.setContext(securityContext);
doReturn(true).when(featureConditionEvaluation).preHandle(any(),any(),any());
MockUtils.setSecurityAuthorities(authentication, MockUtils.ROLE_CASEWORKER);
UserInfo userInfo = UserInfo.builder()
.uid("6b36bfc6-bb21-11ea-b3de-0242ac130006")
Expand Down
Loading