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

Improve SCIM2PaginationTestCase #22838

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,18 @@ public class SCIM2PaginationTestCase extends ISIntegrationTest {
public static final String ITEMS_PER_PAGE_ATTRIBUTE = "itemsPerPage";
public static final String START_INDEX = "2";
public static final String COUNT = "4";
private final String adminUsername;
private final String adminPassword;
private final String tenant;
private String adminUsername;
private String adminPassword;
private String tenant;
List<String> userIds = new ArrayList<>();
UserManagementClient userMgtClient;
AutomationContext automationContext;
String backendUrl = null;
String sessionCookie = null;
TestUserMode userMode;
private CloseableHttpClient client;

@Factory(dataProvider = "scim2UserConfigProvider")
public SCIM2PaginationTestCase(TestUserMode userMode) throws Exception {

AutomationContext context = new AutomationContext("IDENTITY", userMode);
this.adminUsername = context.getContextTenant().getTenantAdmin().getUserName();
this.adminPassword = context.getContextTenant().getTenantAdmin().getPassword();
this.tenant = context.getContextTenant().getDomain();

automationContext = new AutomationContext("IDENTITY", userMode);
backendUrl = automationContext.getContextUrls().getBackEndUrl();
sessionCookie = new LoginLogoutClient(automationContext).login();
userMgtClient = new UserManagementClient(backendUrl, sessionCookie);
this.userMode = userMode;
}

@DataProvider(name = "scim2UserConfigProvider")
Expand All @@ -112,7 +102,13 @@ public static Object[][] scim2UserConfigProvider() {
@BeforeClass(alwaysRun = true)
public void testInit() throws Exception {

super.init();
super.init(userMode);
this.adminUsername = isServer.getContextTenant().getTenantAdmin().getUserName();
this.adminPassword = isServer.getContextTenant().getTenantAdmin().getPassword();
this.tenant = isServer.getContextTenant().getDomain();

userMgtClient = new UserManagementClient(backendURL, sessionCookie);

client = HttpClients.createDefault();
}

Expand Down