1
0

openldap-uid-username.feature 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Feature: LDAP
  2. Background:
  3. Given using api version "2"
  4. And having a valid LDAP configuration
  5. And modify LDAP configuration
  6. | ldapExpertUsernameAttr | uid |
  7. Scenario: Look for a expected LDAP users
  8. Given As an "admin"
  9. And sending "GET" to "/cloud/users"
  10. Then the OCS status code should be "200"
  11. And the "users" result should match
  12. | alice | 1 |
  13. | elisa | 1 |
  14. | ghost | 0 |
  15. Scenario: check default home of an LDAP user
  16. Given As an "admin"
  17. And sending "GET" to "/cloud/users/alice"
  18. Then the OCS status code should be "200"
  19. And the record's fields should match
  20. | storageLocation | /dev/shm/nc_int/alice |
  21. Scenario: check custom relative home of an LDAP user
  22. Given modify LDAP configuration
  23. | homeFolderNamingRule | sn |
  24. And As an "admin"
  25. And sending "GET" to "/cloud/users/alice"
  26. Then the OCS status code should be "200"
  27. And the record's fields should match
  28. | storageLocation | /dev/shm/nc_int/Alfgeirdottir |
  29. Scenario: check custom absolute home of an LDAP user
  30. Given modify LDAP configuration
  31. | homeFolderNamingRule | roomNumber |
  32. And As an "admin"
  33. And sending "GET" to "/cloud/users/elisa"
  34. Then the OCS status code should be "200"
  35. And the record's fields should match
  36. | storageLocation | /dev/shm/elisa-data |
  37. Scenario: Fetch all users, invoking pagination
  38. Given modify LDAP configuration
  39. | ldapBaseUsers | ou=PagingTest,dc=nextcloud,dc=ci |
  40. | ldapPagingSize | 2 |
  41. And As an "admin"
  42. And sending "GET" to "/cloud/users"
  43. Then the OCS status code should be "200"
  44. And the "users" result should match
  45. | ebba | 1 |
  46. | eindis | 1 |
  47. | fjolnir | 1 |
  48. | gunna | 1 |
  49. | juliana | 1 |
  50. | leo | 1 |
  51. | stigur | 1 |
  52. Scenario: Fetch all users, invoking pagination
  53. Given modify LDAP configuration
  54. | ldapBaseUsers | ou=PagingTest,dc=nextcloud,dc=ci |
  55. | ldapPagingSize | 2 |
  56. And As an "admin"
  57. And sending "GET" to "/cloud/users?limit=10"
  58. Then the OCS status code should be "200"
  59. And the "users" result should match
  60. | ebba | 1 |
  61. | eindis | 1 |
  62. | fjolnir | 1 |
  63. | gunna | 1 |
  64. | juliana | 1 |
  65. | leo | 1 |
  66. | stigur | 1 |
  67. Scenario: Fetch from second batch of all users, invoking pagination
  68. Given modify LDAP configuration
  69. | ldapBaseUsers | ou=PagingTest,dc=nextcloud,dc=ci |
  70. | ldapPagingSize | 2 |
  71. And As an "admin"
  72. And sending "GET" to "/cloud/users?limit=10&offset=2"
  73. Then the OCS status code should be "200"
  74. And the "users" result should contain "5" of
  75. | ebba |
  76. | eindis |
  77. | fjolnir |
  78. | gunna |
  79. | juliana |
  80. | leo |
  81. | stigur |
  82. Scenario: Fetch from second batch of all users, invoking pagination with two bases
  83. Given modify LDAP configuration
  84. | ldapBaseUsers | ou=PagingTest,dc=nextcloud,dc=ci;ou=PagingTestSecondBase,dc=nextcloud,dc=ci |
  85. | ldapPagingSize | 2 |
  86. And As an "admin"
  87. And sending "GET" to "/cloud/users?limit=10&offset=2"
  88. Then the OCS status code should be "200"
  89. And the "users" result should contain "5" of
  90. | ebba |
  91. | eindis |
  92. | fjolnir |
  93. | gunna |
  94. | juliana |
  95. | leo |
  96. | stigur |
  97. And the "users" result should contain "3" of
  98. | allisha |
  99. | dogukan |
  100. | lloyd |
  101. | priscilla |
  102. | shannah |