{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/63329","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/63329/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/63329/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/63329/events","html_url":"https://github.com/kubernetes/kubernetes/pull/63329","id":319167453,"number":63329,"title":"use assertions for unit tests of resource_limits under pkg/scheduler","user":{"login":"adshmh","id":23505281,"avatar_url":"https://avatars2.githubusercontent.com/u/23505281?v=4","gravatar_id":"","url":"https://api.github.com/users/adshmh","html_url":"https://github.com/adshmh","followers_url":"https://api.github.com/users/adshmh/followers","following_url":"https://api.github.com/users/adshmh/following{/other_user}","gists_url":"https://api.github.com/users/adshmh/gists{/gist_id}","starred_url":"https://api.github.com/users/adshmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adshmh/subscriptions","organizations_url":"https://api.github.com/users/adshmh/orgs","repos_url":"https://api.github.com/users/adshmh/repos","events_url":"https://api.github.com/users/adshmh/events{/privacy}","received_events_url":"https://api.github.com/users/adshmh/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":573014062,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-ok-to-test","name":"needs-ok-to-test","color":"b60205","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":125550211,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/scheduling","name":"sig/scheduling","color":"d2b48c","default":false},{"id":253450895,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-01T10:37:17Z","updated_at":"2018-05-05T15:36:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/63329","html_url":"https://github.com/kubernetes/kubernetes/pull/63329","diff_url":"https://github.com/kubernetes/kubernetes/pull/63329.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/63329.patch"},"body":"use assertions for unit tests of pkg/scheduler/algorith/priorities/resource_limits\r\n\r\nSigned-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>\r\n\r\n**What this PR does / why we need it**:\r\nReplaces the checks done in unit tests with assertions, for the source file: `pkg/scheduler/algorith/priorities/resource_limits_test.go`\r\n\r\nPlease refer to #43788 for a discussion/list of reasons for using assertions in the unit tests.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\n\r\nPart of work on #43788\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n```release-note\r\nNONE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/386813916","html_url":"https://github.com/kubernetes/kubernetes/pull/63329#issuecomment-386813916","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/63329","id":386813916,"user":{"login":"wgliang","id":8739301,"avatar_url":"https://avatars0.githubusercontent.com/u/8739301?v=4","gravatar_id":"","url":"https://api.github.com/users/wgliang","html_url":"https://github.com/wgliang","followers_url":"https://api.github.com/users/wgliang/followers","following_url":"https://api.github.com/users/wgliang/following{/other_user}","gists_url":"https://api.github.com/users/wgliang/gists{/gist_id}","starred_url":"https://api.github.com/users/wgliang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wgliang/subscriptions","organizations_url":"https://api.github.com/users/wgliang/orgs","repos_url":"https://api.github.com/users/wgliang/repos","events_url":"https://api.github.com/users/wgliang/events{/privacy}","received_events_url":"https://api.github.com/users/wgliang/received_events","type":"User","site_admin":false},"created_at":"2018-05-05T15:36:49Z","updated_at":"2018-05-05T15:36:49Z","author_association":"MEMBER","body":"I don't see much benefit in switching to assert and the current pattern using if reads clearer for me, looks more like Golang. Assert just puts everything into one long line. And we also should avoid inconsistencies in handling those differently in some case that assert can not handled.\r\n\r\ncc @bsalamat @k82cn \r\nWDYT"}}
{"actor":{"display_login":"wgliang"}}