Skip to content

Conversation

@ScharfViktor
Copy link
Contributor

@ScharfViktor ScharfViktor commented Jul 4, 2025

Added:

  • Keycloak tests rewritten. We create all data in Keycloak-ldap and verify that users/groups with the correct permissions are available in OpenCloud.
  • keycloak api steps for:
    creating group
    adding group role
    adding user to group
    delete group
  • the provision steps which API to use (Graph or Keycloak) have been removed.Now we explicitly specify this in the step definition.
  • for admin steps in the step definitions deleted step user. No user choice. There is always an admin.
  • enable tests in CI

Copilot AI review requested due to automatic review settings July 4, 2025 12:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the end-to-end Keycloak test suite by removing the old “provision” API layer, introducing keycloakUuid on entities, and adding full group support and matching Cucumber steps.

  • Add keycloakUuid to user and group types for tracking Keycloak IDs
  • Remove deprecated provision store and API, refactor to use api.graph and direct api.keycloak calls
  • Introduce Keycloak group creation, assignment, and cleanup flows in tests and feature files

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/e2e/support/types.ts Added optional keycloakUuid field to User and Group.
tests/e2e/support/store/keycloak.ts Dropped old user/group stores, now only tracks realm roles.
tests/e2e/support/environment/userManagement.ts Simplified group lookup and removed Keycloak user helpers.
tests/e2e/support/api/keycloak/user.ts Refactored user creation to use getAdminUser, dropped admin param.
tests/e2e/support/api/keycloak/group.ts New Keycloak group API calls: create, add user, delete group.
tests/e2e/cucumber/steps/api.ts Updated steps to call api.graph or api.keycloak, added group steps.
tests/e2e/cucumber/features/keycloak/smoke.feature Added smoke tests covering Keycloak users and groups.
Comments suppressed due to low confidence (1)

tests/e2e/support/api/keycloak/group.ts:75

  • This error message is used in deleteGroup and is misleading. Update it to something like 'Failed while deleting group'.
  checkResponseStatus(response, 'Failed while adding an user to the group')

@ScharfViktor ScharfViktor merged commit baaab9a into main Jul 7, 2025
19 checks passed
@ScharfViktor ScharfViktor deleted the keycloakTests branch July 7, 2025 09:15
@openclouders openclouders mentioned this pull request Jul 7, 2025
1 task
@openclouders openclouders mentioned this pull request Jul 21, 2025
1 task
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.

4 participants