{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22194","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22194/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22194/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22194/events","html_url":"https://github.com/kubernetes/kubernetes/pull/22194","id":137352711,"number":22194,"title":"Use testify for AWS provider","user":{"login":"chbatey","id":1866779,"avatar_url":"https://avatars.githubusercontent.com/u/1866779?v=3","gravatar_id":"","url":"https://api.github.com/users/chbatey","html_url":"https://github.com/chbatey","followers_url":"https://api.github.com/users/chbatey/followers","following_url":"https://api.github.com/users/chbatey/following{/other_user}","gists_url":"https://api.github.com/users/chbatey/gists{/gist_id}","starred_url":"https://api.github.com/users/chbatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chbatey/subscriptions","organizations_url":"https://api.github.com/users/chbatey/orgs","repos_url":"https://api.github.com/users/chbatey/repos","events_url":"https://api.github.com/users/chbatey/events{/privacy}","received_events_url":"https://api.github.com/users/chbatey/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/M","name":"size/M","color":"eebb00"}],"state":"open","locked":false,"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},"milestone":null,"comments":7,"created_at":"2016-02-29T19:49:26Z","updated_at":"2016-02-29T20:05:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/22194","html_url":"https://github.com/kubernetes/kubernetes/pull/22194","diff_url":"https://github.com/kubernetes/kubernetes/pull/22194.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/22194.patch"},"body":"We've started using testify for some private work we plan to raise PRs for. This PR includes an example test to see if others are happy for testify asserts and mocks to be used in aws provider tests. At present we're finding it hard to test the exact calls we're making to AWS.\r\n\r\nThis has two main advantages:\r\n\r\n* The use of the mock package to verify API calls against the aws SDK\r\n* Nicer error messages for asserts without having to use if statements\r\n\r\nExample error message for an assertion failure:\r\n\r\n```\r\nError Trace:\taws_test.go:958\r\nError:\t\tExpected nil, but got: &errors.errorString{s:\"Invalid format for AWS volume (aws://us-east-1a/VolumeName)\"}\r\nMessages:\tError creating Volume &{%!w(string=Invalid format for AWS volume (aws://us-east-1a/VolumeName))}\r\n```\r\n\r\nAnd for a failed verification against the AWS SDK:\r\n\r\n```\r\nmock: Unexpected Method Call\r\n-----------------------------\r\n\r\nDescribeVolumes(*ec2.DescribeVolumesInput)\r\n\t\t0: {\r\n  VolumeIds: [\"WrongVolumeId\"]\r\n}\r\n\r\nThe closest call I have is: \r\n\r\nDescribeVolumes(*ec2.DescribeVolumesInput)\r\n\t\t0: {\r\n  VolumeIds: [\"vol-VolumeId\"]\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/190359724","html_url":"https://github.com/kubernetes/kubernetes/pull/22194#issuecomment-190359724","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/22194","id":190359724,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T20:05:32Z","updated_at":"2016-02-29T20:05:32Z","body":"Labelling this PR as size/M"}}