-
Notifications
You must be signed in to change notification settings - Fork 160
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
[tests-only] [full-ci] Restructure e2e tests data storage for keycloak #10895
Changes from all commits
1a679d5
8097613
99d38b1
0bebdf7
f964334
7f06913
1050729
2e93496
ceaa630
0438d1e
e8573ff
296ccb1
6d6c84e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,20 +92,6 @@ export const createGroup = async ({ | |
return group | ||
} | ||
|
||
const getGroupId = async ({ group, admin }: { group: Group; admin: User }): Promise<string> => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why u remove this api function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function simply returns the group uuid by hitting the API. But the group uuid was already stored during group creation. So, replacing it with the stored value on Moreover it also throws lint error error 'getGroupId' is assigned a value but never used @typescript-eslint/no-unused-vars |
||
let groupId = '' | ||
const response = await request({ | ||
method: 'GET', | ||
path: join('graph', 'v1.0', 'groups', group.displayName), | ||
user: admin | ||
}) | ||
if (response.ok) { | ||
const resBody = (await response.json()) as Group | ||
groupId = resBody.id | ||
} | ||
return groupId | ||
} | ||
|
||
export const deleteGroup = async ({ | ||
group, | ||
admin | ||
|
@@ -133,8 +119,9 @@ export const addUserToGroup = async ({ | |
group: Group | ||
admin: User | ||
}): Promise<void> => { | ||
const groupId = await getGroupId({ group, admin }) | ||
const userId = await getUserId({ user, admin }) | ||
const usersEnvironment = new UsersEnvironment() | ||
const userId = usersEnvironment.getCreatedUser({ key: user.id }).uuid | ||
const groupId = usersEnvironment.getCreatedGroup({ key: group.id }).uuid | ||
const body = JSON.stringify({ | ||
'@odata.id': join(config.backendUrl, 'graph', 'v1.0', 'users', userId) | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { KeycloakRealmRole } from '../types' | ||
import { KeycloakRealmRole, User } from '../types' | ||
|
||
export const keycloakRealmRoles = new Map<string, KeycloakRealmRole>() | ||
export const keycloakCreatedUser = new Map<string, User>() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, that you included
spaces.feature
👍did you try to run test for a full
admin-settings/users.feature
?and second question: can we include
admin-settings/groups.feature
to keycloak test?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I try to run full, but it fails. There is problem on afterall during clean-up which fails to delete the users from oCIS-web. I'll cover that in another PR, but I might need your advice. May be after that we can include some other feature file for keycloak.
Since there is issue on group creation for keycloak issue. So, I think we cannot include the tests related to the group. Or should we include?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ScharfViktor I think user.feature file contains scenarios which change users ceredentials like name, role and password. If we run e2e scenario in user.feature which changes user name, role and password through web-UI then our tests fail because ocis side changes on user name , password , role will not sync with keycloak. Is this actual feature of ocis or a bug?
If unable to change user name, role, password from web is a feature then change quota is only e2e scenario we can run from user.feature file