test if components are synced prerequisite a ldap host is configured a domain is linked to cloudstack some accounts in that domain are linked to groups in ldap
(self)
| 188 | |
| 189 | @attr(tags=["smoke", "advanced"], required_hardware="false") |
| 190 | def test_03_sync(self): |
| 191 | ''' |
| 192 | test if components are synced |
| 193 | |
| 194 | prerequisite |
| 195 | a ldap host is configured |
| 196 | a domain is linked to cloudstack |
| 197 | some accounts in that domain are linked to groups in ldap |
| 198 | ''' |
| 199 | domainid = self.syncDomain.id |
| 200 | username = self.test_user[1] |
| 201 | |
| 202 | # validate the user doesn't exist |
| 203 | response = User.list(self.apiclient,domainid=domainid,username=username) |
| 204 | self.assertEqual(response, None, "user should not exist yet") |
| 205 | |
| 206 | self.logon_test_user(username) |
| 207 | |
| 208 | # now validate the user exists in domain |
| 209 | response = User.list(self.apiclient,domainid=domainid,username=username) |
| 210 | for user in response: |
| 211 | user_created = User(user.__dict__) |
| 212 | self.logger.debug("user to clean: %s (id: %s)" % (user_created.username, user_created.id)) |
| 213 | self.cleanup.append(user_created) |
| 214 | |
| 215 | # now verify the creation of the user |
| 216 | self.assertEqual(len(response), 1, "user should exist by now") |
| 217 | |
| 218 | return |
| 219 | |
| 220 | @attr(tags=["smoke", "advanced"], required_hardware="false") |
| 221 | def test_04_filtered_list_of_users(self): |
nothing calls this directly
no test coverage detected