{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/78428473","id":78428473,"diff_hunk":"@@ -66,73 +68,98 @@ var _ = framework.KubeDescribe(\"DisruptionController\", func() {\n \n \t})\n \n-\tIt(\"should allow an eviction when there is no PDB\", func() {\n-\t\tcreatePodsOrDie(cs, ns, 1)\n-\n-\t\tpod, err := cs.Pods(ns).Get(\"pod-0\")\n-\t\tExpect(err).NotTo(HaveOccurred())\n-\n-\t\te := &policy.Eviction{\n-\t\t\tObjectMeta: api.ObjectMeta{\n-\t\t\t\tName:      pod.Name,\n-\t\t\t\tNamespace: ns,\n-\t\t\t},\n-\t\t}\n-\n-\t\terr = cs.Pods(ns).Evict(e)\n-\t\tExpect(err).NotTo(HaveOccurred())\n-\t})\n-\n-\tIt(\"should not allow an eviction when too few pods\", func() {\n-\t\tcreatePodDisruptionBudgetOrDie(cs, ns, intstr.FromInt(2))\n-\n-\t\tcreatePodsOrDie(cs, ns, 1)\n-\n-\t\tpod, err := cs.Pods(ns).Get(\"pod-0\")\n-\t\tExpect(err).NotTo(HaveOccurred())\n-\n-\t\te := &policy.Eviction{\n-\t\t\tObjectMeta: api.ObjectMeta{\n-\t\t\t\tName:      pod.Name,\n-\t\t\t\tNamespace: ns,\n-\t\t\t},\n+\tevictionCases := []struct {\n+\t\tdescription    string\n+\t\tminAvailable   intstr.IntOrString\n+\t\tpodCount       int\n+\t\treplicaSetSize int32\n+\t\tshouldDeny     bool\n+\t}{\n+\t\t{\n+\t\t\tdescription:  \"no PDB\",\n+\t\t\tminAvailable: intstr.FromString(\"\"),\n+\t\t\tpodCount:     1,\n+\t\t\tshouldDeny:   false,\n+\t\t}, {\n+\t\t\tdescription:  \"too few pods, absolute\",\n+\t\t\tminAvailable: intstr.FromInt(2),\n+\t\t\tpodCount:     1,\n+\t\t\tshouldDeny:   true,\n+\t\t}, {\n+\t\t\tdescription:  \"enough pods, absolute\",\n+\t\t\tminAvailable: intstr.FromInt(2),\n+\t\t\tpodCount:     2,\n+\t\t\tshouldDeny:   false,\n+\t\t}, {\n+\t\t\tdescription:    \"enough pods, replicaSet, percentage\",","path":"test/e2e/disruption.go","position":68,"original_position":68,"commit_id":"0aa7778c2a65051b46768cf29d8e8587a268302c","original_commit_id":"0aa7778c2a65051b46768cf29d8e8587a268302c","user":{"login":"mml","id":3115,"avatar_url":"https://avatars.githubusercontent.com/u/3115?v=3","gravatar_id":"","url":"https://api.github.com/users/mml","html_url":"https://github.com/mml","followers_url":"https://api.github.com/users/mml/followers","following_url":"https://api.github.com/users/mml/following{/other_user}","gists_url":"https://api.github.com/users/mml/gists{/gist_id}","starred_url":"https://api.github.com/users/mml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mml/subscriptions","organizations_url":"https://api.github.com/users/mml/orgs","repos_url":"https://api.github.com/users/mml/repos","events_url":"https://api.github.com/users/mml/events{/privacy}","received_events_url":"https://api.github.com/users/mml/received_events","type":"User","site_admin":false},"body":"I had been trying to figure out how to force a controller to be at <100%.  The best I can come up with is to put an impossible node selector on it to make 0% of them be ready.  WDYT?","created_at":"2016-09-12T18:32:31Z","updated_at":"2016-09-12T18:32:31Z","html_url":"https://github.com/kubernetes/kubernetes/pull/32160#discussion_r78428473","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/78428473"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32160#discussion_r78428473"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160","id":84199688,"html_url":"https://github.com/kubernetes/kubernetes/pull/32160","diff_url":"https://github.com/kubernetes/kubernetes/pull/32160.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/32160.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32160","number":32160,"state":"open","locked":false,"title":"Refactor disruption e2e test and add some eviction test cases.","user":{"login":"mml","id":3115,"avatar_url":"https://avatars.githubusercontent.com/u/3115?v=3","gravatar_id":"","url":"https://api.github.com/users/mml","html_url":"https://github.com/mml","followers_url":"https://api.github.com/users/mml/followers","following_url":"https://api.github.com/users/mml/following{/other_user}","gists_url":"https://api.github.com/users/mml/gists{/gist_id}","starred_url":"https://api.github.com/users/mml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mml/subscriptions","organizations_url":"https://api.github.com/users/mml/orgs","repos_url":"https://api.github.com/users/mml/repos","events_url":"https://api.github.com/users/mml/events{/privacy}","received_events_url":"https://api.github.com/users/mml/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/32160)\n<!-- Reviewable:end -->\n","created_at":"2016-09-06T21:28:15Z","updated_at":"2016-09-12T18:32:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed0552ccae73e04598f62632c870a699502ee197","assignee":{"login":"davidopp","id":8264113,"avatar_url":"https://avatars.githubusercontent.com/u/8264113?v=3","gravatar_id":"","url":"https://api.github.com/users/davidopp","html_url":"https://github.com/davidopp","followers_url":"https://api.github.com/users/davidopp/followers","following_url":"https://api.github.com/users/davidopp/following{/other_user}","gists_url":"https://api.github.com/users/davidopp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidopp/subscriptions","organizations_url":"https://api.github.com/users/davidopp/orgs","repos_url":"https://api.github.com/users/davidopp/repos","events_url":"https://api.github.com/users/davidopp/events{/privacy}","received_events_url":"https://api.github.com/users/davidopp/received_events","type":"User","site_admin":false},"assignees":[{"login":"davidopp","id":8264113,"avatar_url":"https://avatars.githubusercontent.com/u/8264113?v=3","gravatar_id":"","url":"https://api.github.com/users/davidopp","html_url":"https://github.com/davidopp","followers_url":"https://api.github.com/users/davidopp/followers","following_url":"https://api.github.com/users/davidopp/following{/other_user}","gists_url":"https://api.github.com/users/davidopp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidopp/subscriptions","organizations_url":"https://api.github.com/users/davidopp/orgs","repos_url":"https://api.github.com/users/davidopp/repos","events_url":"https://api.github.com/users/davidopp/events{/privacy}","received_events_url":"https://api.github.com/users/davidopp/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/22","html_url":"https://github.com/kubernetes/kubernetes/milestones/v1.4","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/22/labels","id":1777384,"number":22,"title":"v1.4","description":"https://github.com/kubernetes/features/blob/master/release-1.4/Release-1.4.md","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":46,"closed_issues":845,"state":"open","created_at":"2016-05-19T18:50:19Z","updated_at":"2016-09-12T18:26:29Z","due_on":"2016-09-20T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/32160/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/0aa7778c2a65051b46768cf29d8e8587a268302c","head":{"label":"mml:evict.test.extra","ref":"evict.test.extra","sha":"0aa7778c2a65051b46768cf29d8e8587a268302c","user":{"login":"mml","id":3115,"avatar_url":"https://avatars.githubusercontent.com/u/3115?v=3","gravatar_id":"","url":"https://api.github.com/users/mml","html_url":"https://github.com/mml","followers_url":"https://api.github.com/users/mml/followers","following_url":"https://api.github.com/users/mml/following{/other_user}","gists_url":"https://api.github.com/users/mml/gists{/gist_id}","starred_url":"https://api.github.com/users/mml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mml/subscriptions","organizations_url":"https://api.github.com/users/mml/orgs","repos_url":"https://api.github.com/users/mml/repos","events_url":"https://api.github.com/users/mml/events{/privacy}","received_events_url":"https://api.github.com/users/mml/received_events","type":"User","site_admin":false},"repo":{"id":45429185,"name":"kubernetes","full_name":"mml/kubernetes","owner":{"login":"mml","id":3115,"avatar_url":"https://avatars.githubusercontent.com/u/3115?v=3","gravatar_id":"","url":"https://api.github.com/users/mml","html_url":"https://github.com/mml","followers_url":"https://api.github.com/users/mml/followers","following_url":"https://api.github.com/users/mml/following{/other_user}","gists_url":"https://api.github.com/users/mml/gists{/gist_id}","starred_url":"https://api.github.com/users/mml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mml/subscriptions","organizations_url":"https://api.github.com/users/mml/orgs","repos_url":"https://api.github.com/users/mml/repos","events_url":"https://api.github.com/users/mml/events{/privacy}","received_events_url":"https://api.github.com/users/mml/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mml/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/mml/kubernetes","forks_url":"https://api.github.com/repos/mml/kubernetes/forks","keys_url":"https://api.github.com/repos/mml/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mml/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mml/kubernetes/teams","hooks_url":"https://api.github.com/repos/mml/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/mml/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/mml/kubernetes/events","assignees_url":"https://api.github.com/repos/mml/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/mml/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/mml/kubernetes/tags","blobs_url":"https://api.github.com/repos/mml/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mml/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mml/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/mml/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mml/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/mml/kubernetes/languages","stargazers_url":"https://api.github.com/repos/mml/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/mml/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/mml/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/mml/kubernetes/subscription","commits_url":"https://api.github.com/repos/mml/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/mml/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/mml/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/mml/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/mml/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/mml/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mml/kubernetes/merges","archive_url":"https://api.github.com/repos/mml/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mml/kubernetes/downloads","issues_url":"https://api.github.com/repos/mml/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/mml/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/mml/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/mml/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mml/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/mml/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/mml/kubernetes/deployments","created_at":"2015-11-02T23:37:23Z","updated_at":"2016-04-05T23:13:38Z","pushed_at":"2016-09-09T22:57:07Z","git_url":"git://github.com/mml/kubernetes.git","ssh_url":"git@github.com:mml/kubernetes.git","clone_url":"https://github.com/mml/kubernetes.git","svn_url":"https://github.com/mml/kubernetes","homepage":"http://kubernetes.io","size":316328,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"kubernetes:master","ref":"master","sha":"943d7aa5aa42d8fc359614e1c02521f48d03b989","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-09-12T15:52:41Z","pushed_at":"2016-09-12T18:26:30Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":561012,"stargazers_count":16749,"watchers_count":16749,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5387,"mirror_url":null,"open_issues_count":4370,"forks":5387,"open_issues":4370,"watchers":16749,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/32160"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32160"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/32160/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/32160/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/0aa7778c2a65051b46768cf29d8e8587a268302c"}}}}
{"actor":{"display_login":"mml"}}