8000 Migrate Organization Partial Export test into new testsuite by hammadxcm · Pull Request #48204 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content

Migrate Organization Partial Export test into new testsuite - #48204

Open
hammadxcm wants to merge 1 commit into
keycloak:mainfrom
hammadxcm:migrate-organization-exportimport-tests
Open

hammadxcm wants to merge 1 commit into
keycloak:mainfrom
hammadxcm:migrate-organization-exportimport-tests

Conversation

@hammadxcm
@hammadxcm hammadxcm commented Apr 17, 2026 •
Copy link
Copy Markdown
Contributor

Parent tracking issue: #47926

Part of #48181

Migrates testPartialExport from the legacy OrganizationExportTest (testsuite/integration-arquillian/.../organization/exportimport/) to the new framework under tests/base/.../organization/exportimport/.

Only testPartialExport is ported in this PR because it is the one test method in the legacy file that relies solely on the organization admin API (realm.partialExport(...) / realm.partialImport(...)). The remaining two tests in the legacy file are not migrated here:

  • testExport — exercises broker-driven federated user flows (bc.setUpIdentityProvider(), loginPage, etc.). Requires a new-framework equivalent of BrokerConfiguration, which does not yet exist.
  • testExportImportEmptyOrg — uses TestingExportImportResource plus testRealm().remove() followed by re-import. The new framework's ManagedRealm owns the realm lifecycle, so removing the realm beneath it breaks the fixture. This test needs a testframework-level design decision (export/import support) before it can be migrated.

No logic changes — just the usual annotation / import swap:

  • Extends the new-framework AbstractOrganizationTest.
  • @KeycloakIntegrationTest added at class level.
  • testRealm().partialExport(...) → realm.admin().partialExport(...).
  • JUnit 4 @Test / assertTrue → JUnit 5 equivalents.

Legacy file still contains the two unported tests so coverage is not lost.

Signed-off-by: hammadxcm <hammadkhanxcm@gmail.com>
6F1A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0