Commit 394746ff authored by Sanad Liaquat's avatar Sanad Liaquat

Some refactoring done

parent d85adbac
......@@ -2,7 +2,8 @@
module QA
context 'Manage', :orchestrated, :ldap_tls, :ldap_no_tls do
it 'Has LDAP user synced using group cn method' do
describe 'LDAP Group sync' do
before(:all) do
users = [
{
name: 'ENG User 2',
......@@ -17,12 +18,28 @@ module QA
email: 'enguser3@example.org',
provider: 'ldapmain',
extern_uid: 'uid=enguser3,ou=people,ou=global groups,dc=example,dc=org'
},
{
name: 'HR User 2',
username: 'hruser2',
email: 'hruser2@example.org',
provider: 'ldapmain',
extern_uid: 'uid=hruser2,ou=people,ou=global groups,dc=example,dc=org'
},
{
name: 'HR User 3',
username: 'hruser3',
email: 'hruser3@example.org',
provider: 'ldapmain',
extern_uid: 'uid=hruser3,ou=people,ou=global groups,dc=example,dc=org'
}
]
create_users_via_api(users)
end
it 'Has LDAP user synced using group cn method' do
Runtime::Browser.visit(:gitlab, Page::Main::Login)
create_group_with_user_via_api(user: 'enguser1', group_name: 'Synched-engineering-group')
EE::Page::Group::Menu.perform(&:go_to_ldap_sync_settings)
......@@ -39,25 +56,6 @@ module QA
end
it 'Has LDAP user synced using user filter method' do
users = [
{
name: 'HR User 2',
username: 'hruser2',
email: 'hruser2@example.org',
provider: 'ldapmain',
extern_uid: 'uid=hruser2,ou=people,ou=global groups,dc=example,dc=org'
},
{
name: 'HR User 3',
username: 'hruser3',
email: 'hruser3@example.org',
provider: 'ldapmain',
extern_uid: 'uid=hruser3,ou=people,ou=global groups,dc=example,dc=org'
}
]
create_users_via_api(users)
Runtime::Browser.visit(:gitlab, Page::Main::Login)
create_group_with_user_via_api(user: 'hruser1', group_name: 'Synched-human-resources-group')
......@@ -114,4 +112,5 @@ module QA
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment