Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit 22a420b5 authored by John C Boufford's avatar John C Boufford
Browse files

Completed crud operations, add find my groups by role. Started Searching unit test.

parent 83ddcbff
......@@ -85,7 +85,66 @@ class IamGroupSearchTests(unittest.TestCase):
# name = "cn=group name,ou=user groups,ou=groups,dc=umich,dc=edu"
# name = "someone@yahoo.com"
encoded = urllib.parse.quote(name)
url = IamGroupSearchTests.url_base + '/' + url_endpoint + '/' + name
url = IamGroupSearchTests.url_base + '/' + url_endpoint + '/' + encoded
response = requests.get(
url=url,
headers=api.build_headers(),
timeout=10
)
print(api.build_headers())
print('Response: {}'.format(response))
print('JSON: {}'.format(response.json()))
self.assertEqual(response.status_code, requests.codes.ok)
# Search for a member in the groups Im an owner.
def test_find_person_by_uniqname(self):
api = ApiDirectory(self.client_id, self.secret, self.scope, self.token_url)
url_endpoint = 'find/person'
uniqname = "jbouffor"
#Since uniqname are alpha numeric without spaces this is not really needed.
encoded = urllib.parse.quote(uniqname)
url = IamGroupSearchTests.url_base + '/' + url_endpoint + '/' + encoded
response = requests.get(
url=url,
headers=api.build_headers(),
timeout=10
)
print(api.build_headers())
print('Response: {}'.format(response))
print('JSON: {}'.format(response.json()))
self.assertEqual(response.status_code, requests.codes.ok)
def test_find_group_by_name_or_person(self):
api = ApiDirectory(self.client_id, self.secret, self.scope, self.token_url)
url_endpoint = 'find/both'
uniqname = "post-its-notes"
#Since uniqname are alpha numeric without spaces this is not really needed.
encoded = urllib.parse.quote(uniqname)
url = IamGroupSearchTests.url_base + '/' + url_endpoint + '/' + encoded
response = requests.get(
url=url,
headers=api.build_headers(),
timeout=10
)
print(api.build_headers())
print('Response: {}'.format(response))
print('JSON: {}'.format(response.json()))
self.assertEqual(response.status_code, requests.codes.ok)
def test_find_group_by_name(self):
api = ApiDirectory(self.client_id, self.secret, self.scope, self.token_url)
url_endpoint = 'find/typeahead'
uniqname = "post-its-notes"
# Since uniqname are alpha numeric without spaces this is not really needed.
encoded = urllib.parse.quote(uniqname)
url = IamGroupSearchTests.url_base + '/' + url_endpoint + '/' + encoded
response = requests.get(
url=url,
......
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