{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/comments/43249131","id":43249131,"diff_hunk":"@@ -130,6 +131,20 @@ def users_in_group(name)\n     ldap_con.user_list(name)\n   end\n \n+  def test_connection\n+    result = {}\n+    begin\n+      Timeout::timeout(60) do","path":"app/models/auth_sources/auth_source_ldap.rb","position":15,"original_position":15,"commit_id":"3fe241d3b2223c86810525c19618502c62317526","original_commit_id":"3fe241d3b2223c86810525c19618502c62317526","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"I'd suggest a slightly shorter time, perhaps 10-20 seconds?  I don't think it'll make any difference to a normal LDAP server, and it'll make the UI error show faster.","created_at":"2015-10-28T12:36:38Z","updated_at":"2015-10-28T12:36:38Z","html_url":"https://github.com/theforeman/foreman/pull/2758#discussion_r43249131","pull_request_url":"https://api.github.com/repos/theforeman/foreman/pulls/2758","_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments/43249131"},"html":{"href":"https://github.com/theforeman/foreman/pull/2758#discussion_r43249131"},"pull_request":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2758"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2758","id":45888312,"html_url":"https://github.com/theforeman/foreman/pull/2758","diff_url":"https://github.com/theforeman/foreman/pull/2758.diff","patch_url":"https://github.com/theforeman/foreman/pull/2758.patch","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2758","number":2758,"state":"open","locked":false,"title":"Fixes #7537 - Adds test connection button to LDAP form","user":{"login":"amirfefer","id":11807069,"avatar_url":"https://avatars.githubusercontent.com/u/11807069?v=3","gravatar_id":"","url":"https://api.github.com/users/amirfefer","html_url":"https://github.com/amirfefer","followers_url":"https://api.github.com/users/amirfefer/followers","following_url":"https://api.github.com/users/amirfefer/following{/other_user}","gists_url":"https://api.github.com/users/amirfefer/gists{/gist_id}","starred_url":"https://api.github.com/users/amirfefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amirfefer/subscriptions","organizations_url":"https://api.github.com/users/amirfefer/orgs","repos_url":"https://api.github.com/users/amirfefer/repos","events_url":"https://api.github.com/users/amirfefer/events{/privacy}","received_events_url":"https://api.github.com/users/amirfefer/received_events","type":"User","site_admin":false},"body":"Plus API support for testing LDAP connection.\r\nscreenshots:\r\n![ldap_error](https://cloud.githubusercontent.com/assets/11807069/10072700/4d3c5830-62cc-11e5-86b3-74dffe07c57f.png)\r\n\r\n![ldap_success](https://cloud.githubusercontent.com/assets/11807069/10072704/51c92b1c-62cc-11e5-8c62-012e294f0508.png)\r\n\r\n","created_at":"2015-09-24T11:57:11Z","updated_at":"2015-10-28T12:36:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d9e4d2ed040b85a339cb1f59d5607707df96915","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/foreman/pulls/2758/commits","review_comments_url":"https://api.github.com/repos/theforeman/foreman/pulls/2758/comments","review_comment_url":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2758/comments","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/3fe241d3b2223c86810525c19618502c62317526","head":{"label":"amirfefer:11703","ref":"11703","sha":"3fe241d3b2223c86810525c19618502c62317526","user":{"login":"amirfefer","id":11807069,"avatar_url":"https://avatars.githubusercontent.com/u/11807069?v=3","gravatar_id":"","url":"https://api.github.com/users/amirfefer","html_url":"https://github.com/amirfefer","followers_url":"https://api.github.com/users/amirfefer/followers","following_url":"https://api.github.com/users/amirfefer/following{/other_user}","gists_url":"https://api.github.com/users/amirfefer/gists{/gist_id}","starred_url":"https://api.github.com/users/amirfefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amirfefer/subscriptions","organizations_url":"https://api.github.com/users/amirfefer/orgs","repos_url":"https://api.github.com/users/amirfefer/repos","events_url":"https://api.github.com/users/amirfefer/events{/privacy}","received_events_url":"https://api.github.com/users/amirfefer/received_events","type":"User","site_admin":false},"repo":{"id":39390219,"name":"foreman","full_name":"amirfefer/foreman","owner":{"login":"amirfefer","id":11807069,"avatar_url":"https://avatars.githubusercontent.com/u/11807069?v=3","gravatar_id":"","url":"https://api.github.com/users/amirfefer","html_url":"https://github.com/amirfefer","followers_url":"https://api.github.com/users/amirfefer/followers","following_url":"https://api.github.com/users/amirfefer/following{/other_user}","gists_url":"https://api.github.com/users/amirfefer/gists{/gist_id}","starred_url":"https://api.github.com/users/amirfefer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amirfefer/subscriptions","organizations_url":"https://api.github.com/users/amirfefer/orgs","repos_url":"https://api.github.com/users/amirfefer/repos","events_url":"https://api.github.com/users/amirfefer/events{/privacy}","received_events_url":"https://api.github.com/users/amirfefer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amirfefer/foreman","description":"an application that automates the lifecycle of servers ","fork":true,"url":"https://api.github.com/repos/amirfefer/foreman","forks_url":"https://api.github.com/repos/amirfefer/foreman/forks","keys_url":"https://api.github.com/repos/amirfefer/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amirfefer/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amirfefer/foreman/teams","hooks_url":"https://api.github.com/repos/amirfefer/foreman/hooks","issue_events_url":"https://api.github.com/repos/amirfefer/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/amirfefer/foreman/events","assignees_url":"https://api.github.com/repos/amirfefer/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/amirfefer/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/amirfefer/foreman/tags","blobs_url":"https://api.github.com/repos/amirfefer/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amirfefer/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amirfefer/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/amirfefer/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amirfefer/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/amirfefer/foreman/languages","stargazers_url":"https://api.github.com/repos/amirfefer/foreman/stargazers","contributors_url":"https://api.github.com/repos/amirfefer/foreman/contributors","subscribers_url":"https://api.github.com/repos/amirfefer/foreman/subscribers","subscription_url":"https://api.github.com/repos/amirfefer/foreman/subscription","commits_url":"https://api.github.com/repos/amirfefer/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/amirfefer/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/amirfefer/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/amirfefer/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/amirfefer/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/amirfefer/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amirfefer/foreman/merges","archive_url":"https://api.github.com/repos/amirfefer/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amirfefer/foreman/downloads","issues_url":"https://api.github.com/repos/amirfefer/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/amirfefer/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/amirfefer/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/amirfefer/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amirfefer/foreman/labels{/name}","releases_url":"https://api.github.com/repos/amirfefer/foreman/releases{/id}","created_at":"2015-07-20T14:57:37Z","updated_at":"2015-07-20T14:57:41Z","pushed_at":"2015-10-27T16:29:42Z","git_url":"git://github.com/amirfefer/foreman.git","ssh_url":"git@github.com:amirfefer/foreman.git","clone_url":"https://github.com/amirfefer/foreman.git","svn_url":"https://github.com/amirfefer/foreman","homepage":"http://theforeman.org","size":37137,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"theforeman:develop","ref":"develop","sha":"212b82509028bfca70f6a83e847df06d28552b1b","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":258750,"name":"foreman","full_name":"theforeman/foreman","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/foreman","description":"an application that automates the lifecycle of servers ","fork":false,"url":"https://api.github.com/repos/theforeman/foreman","forks_url":"https://api.github.com/repos/theforeman/foreman/forks","keys_url":"https://api.github.com/repos/theforeman/foreman/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/foreman/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/foreman/teams","hooks_url":"https://api.github.com/repos/theforeman/foreman/hooks","issue_events_url":"https://api.github.com/repos/theforeman/foreman/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/foreman/events","assignees_url":"https://api.github.com/repos/theforeman/foreman/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/foreman/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/foreman/tags","blobs_url":"https://api.github.com/repos/theforeman/foreman/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/foreman/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/foreman/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/foreman/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/foreman/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/foreman/languages","stargazers_url":"https://api.github.com/repos/theforeman/foreman/stargazers","contributors_url":"https://api.github.com/repos/theforeman/foreman/contributors","subscribers_url":"https://api.github.com/repos/theforeman/foreman/subscribers","subscription_url":"https://api.github.com/repos/theforeman/foreman/subscription","commits_url":"https://api.github.com/repos/theforeman/foreman/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/foreman/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/foreman/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/foreman/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/foreman/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/foreman/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/foreman/merges","archive_url":"https://api.github.com/repos/theforeman/foreman/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/foreman/downloads","issues_url":"https://api.github.com/repos/theforeman/foreman/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/foreman/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/foreman/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/foreman/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/foreman/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/foreman/releases{/id}","created_at":"2009-07-23T15:07:00Z","updated_at":"2015-10-28T09:44:58Z","pushed_at":"2015-10-28T12:24:26Z","git_url":"git://github.com/theforeman/foreman.git","ssh_url":"git@github.com:theforeman/foreman.git","clone_url":"https://github.com/theforeman/foreman.git","svn_url":"https://github.com/theforeman/foreman","homepage":"http://theforeman.org","size":96684,"stargazers_count":876,"watchers_count":876,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":442,"mirror_url":null,"open_issues_count":88,"forks":442,"open_issues":88,"watchers":876,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2758"},"html":{"href":"https://github.com/theforeman/foreman/pull/2758"},"issue":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2758"},"comments":{"href":"https://api.github.com/repos/theforeman/foreman/issues/2758/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2758/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/foreman/pulls/2758/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/foreman/statuses/3fe241d3b2223c86810525c19618502c62317526"}}}}