{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/50548220","id":50548220,"diff_hunk":"@@ -0,0 +1,365 @@\n+package requestlimit\n+\n+import (\n+\t\"bytes\"\n+\t\"testing\"\n+\n+\t\"k8s.io/kubernetes/pkg/admission\"\n+\tkapi \"k8s.io/kubernetes/pkg/api\"\n+\t\"k8s.io/kubernetes/pkg/auth/user\"\n+\t\"k8s.io/kubernetes/pkg/client/cache\"\n+\tktestclient \"k8s.io/kubernetes/pkg/client/unversioned/testclient\"\n+\t\"k8s.io/kubernetes/pkg/labels\"\n+\t\"k8s.io/kubernetes/pkg/runtime\"\n+\n+\t\"github.com/openshift/origin/pkg/client/testclient\"\n+\toadmission \"github.com/openshift/origin/pkg/cmd/server/admission\"\n+\tprojectapi \"github.com/openshift/origin/pkg/project/api\"\n+\tprojectcache \"github.com/openshift/origin/pkg/project/cache\"\n+\tuserapi \"github.com/openshift/origin/pkg/user/api\"\n+\tapierrors \"k8s.io/kubernetes/pkg/api/errors\"\n+)\n+\n+func TestReadConfig(t *testing.T) {\n+\n+\ttests := []struct {\n+\t\tconfig      string\n+\t\texpected    ProjectRequestLimitConfig\n+\t\terrExpected bool\n+\t}{\n+\t\t{\n+\t\t\t// multiple selectors\n+\t\t\tconfig: `apiVersion: v1\n+kind: ProjectRequestLimitConfig\n+limits:\n+- selector:\n+    level:","path":"pkg/project/admission/requestlimit/admission_test.go","position":36,"original_position":36,"commit_id":"a8257c784561ef3e105732bb27eed27089526d0a","original_commit_id":"591cbd40ae134cddec0386a84a6b3b793c734efd","user":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"body":"fixed. Oddly it worked with either form. ","created_at":"2016-01-22T15:20:42Z","updated_at":"2016-01-22T15:20:42Z","html_url":"https://github.com/openshift/origin/pull/6768#discussion_r50548220","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/6768","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/50548220"},"html":{"href":"https://github.com/openshift/origin/pull/6768#discussion_r50548220"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/6768"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/6768","id":56795194,"html_url":"https://github.com/openshift/origin/pull/6768","diff_url":"https://github.com/openshift/origin/pull/6768.diff","patch_url":"https://github.com/openshift/origin/pull/6768.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/6768","number":6768,"state":"open","locked":false,"title":"Project request quota admission control","user":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"body":"Adds admission control plugin to control quota per plugin configuration.","created_at":"2016-01-21T19:15:56Z","updated_at":"2016-01-22T15:20:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4263640c223f1118b47de26861ea4641306371bb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/6768/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/6768/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/6768/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/a8257c784561ef3e105732bb27eed27089526d0a","head":{"label":"csrwng:projectreq_limit","ref":"projectreq_limit","sha":"a8257c784561ef3e105732bb27eed27089526d0a","user":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"repo":{"id":23592505,"name":"origin","full_name":"csrwng/origin","owner":{"login":"csrwng","id":5834976,"avatar_url":"https://avatars.githubusercontent.com/u/5834976?v=3","gravatar_id":"","url":"https://api.github.com/users/csrwng","html_url":"https://github.com/csrwng","followers_url":"https://api.github.com/users/csrwng/followers","following_url":"https://api.github.com/users/csrwng/following{/other_user}","gists_url":"https://api.github.com/users/csrwng/gists{/gist_id}","starred_url":"https://api.github.com/users/csrwng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csrwng/subscriptions","organizations_url":"https://api.github.com/users/csrwng/orgs","repos_url":"https://api.github.com/users/csrwng/repos","events_url":"https://api.github.com/users/csrwng/events{/privacy}","received_events_url":"https://api.github.com/users/csrwng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/csrwng/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/csrwng/origin","forks_url":"https://api.github.com/repos/csrwng/origin/forks","keys_url":"https://api.github.com/repos/csrwng/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csrwng/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csrwng/origin/teams","hooks_url":"https://api.github.com/repos/csrwng/origin/hooks","issue_events_url":"https://api.github.com/repos/csrwng/origin/issues/events{/number}","events_url":"https://api.github.com/repos/csrwng/origin/events","assignees_url":"https://api.github.com/repos/csrwng/origin/assignees{/user}","branches_url":"https://api.github.com/repos/csrwng/origin/branches{/branch}","tags_url":"https://api.github.com/repos/csrwng/origin/tags","blobs_url":"https://api.github.com/repos/csrwng/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csrwng/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csrwng/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/csrwng/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csrwng/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/csrwng/origin/languages","stargazers_url":"https://api.github.com/repos/csrwng/origin/stargazers","contributors_url":"https://api.github.com/repos/csrwng/origin/contributors","subscribers_url":"https://api.github.com/repos/csrwng/origin/subscribers","subscription_url":"https://api.github.com/repos/csrwng/origin/subscription","commits_url":"https://api.github.com/repos/csrwng/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/csrwng/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/csrwng/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/csrwng/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/csrwng/origin/contents/{+path}","compare_url":"https://api.github.com/repos/csrwng/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csrwng/origin/merges","archive_url":"https://api.github.com/repos/csrwng/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csrwng/origin/downloads","issues_url":"https://api.github.com/repos/csrwng/origin/issues{/number}","pulls_url":"https://api.github.com/repos/csrwng/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/csrwng/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/csrwng/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csrwng/origin/labels{/name}","releases_url":"https://api.github.com/repos/csrwng/origin/releases{/id}","deployments_url":"https://api.github.com/repos/csrwng/origin/deployments","created_at":"2014-09-02T19:29:25Z","updated_at":"2016-01-11T13:43:26Z","pushed_at":"2016-01-22T03:33:08Z","git_url":"git://github.com/csrwng/origin.git","ssh_url":"git@github.com:csrwng/origin.git","clone_url":"https://github.com/csrwng/origin.git","svn_url":"https://github.com/csrwng/origin","homepage":"https://openshift.github.io","size":196565,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"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":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"d769170ef68d4e896d2bc97774c85d674a813e13","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-01-22T14:19:53Z","pushed_at":"2016-01-22T15:09:03Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":250735,"stargazers_count":925,"watchers_count":925,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":588,"mirror_url":null,"open_issues_count":772,"forks":588,"open_issues":772,"watchers":925,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/6768"},"html":{"href":"https://github.com/openshift/origin/pull/6768"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/6768"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/6768/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/6768/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/6768/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/a8257c784561ef3e105732bb27eed27089526d0a"}}}}