{"action":"created","issue":{"url":"https://api.github.com/repos/deis/deis/issues/3820","labels_url":"https://api.github.com/repos/deis/deis/issues/3820/labels{/name}","comments_url":"https://api.github.com/repos/deis/deis/issues/3820/comments","events_url":"https://api.github.com/repos/deis/deis/issues/3820/events","html_url":"https://github.com/deis/deis/issues/3820","id":86334034,"number":3820,"title":"Proposal: Plan for improving testing of Deisctl","user":{"login":"Joshua-Anderson","id":3526404,"avatar_url":"https://avatars.githubusercontent.com/u/3526404?v=3","gravatar_id":"","url":"https://api.github.com/users/Joshua-Anderson","html_url":"https://github.com/Joshua-Anderson","followers_url":"https://api.github.com/users/Joshua-Anderson/followers","following_url":"https://api.github.com/users/Joshua-Anderson/following{/other_user}","gists_url":"https://api.github.com/users/Joshua-Anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/Joshua-Anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joshua-Anderson/subscriptions","organizations_url":"https://api.github.com/users/Joshua-Anderson/orgs","repos_url":"https://api.github.com/users/Joshua-Anderson/repos","events_url":"https://api.github.com/users/Joshua-Anderson/events{/privacy}","received_events_url":"https://api.github.com/users/Joshua-Anderson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/deis/deis/labels/deisctl","name":"deisctl","color":"f7c6c7"},{"url":"https://api.github.com/repos/deis/deis/labels/proposal","name":"proposal","color":"0052cc"},{"url":"https://api.github.com/repos/deis/deis/labels/tests","name":"tests","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"Joshua-Anderson","id":3526404,"avatar_url":"https://avatars.githubusercontent.com/u/3526404?v=3","gravatar_id":"","url":"https://api.github.com/users/Joshua-Anderson","html_url":"https://github.com/Joshua-Anderson","followers_url":"https://api.github.com/users/Joshua-Anderson/followers","following_url":"https://api.github.com/users/Joshua-Anderson/following{/other_user}","gists_url":"https://api.github.com/users/Joshua-Anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/Joshua-Anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joshua-Anderson/subscriptions","organizations_url":"https://api.github.com/users/Joshua-Anderson/orgs","repos_url":"https://api.github.com/users/Joshua-Anderson/repos","events_url":"https://api.github.com/users/Joshua-Anderson/events{/privacy}","received_events_url":"https://api.github.com/users/Joshua-Anderson/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/deis/deis/milestones/40","html_url":"https://github.com/deis/deis/milestones/v1.8","labels_url":"https://api.github.com/repos/deis/deis/milestones/40/labels","id":1100516,"number":40,"title":"v1.8","description":"","creator":{"login":"mboersma","id":73019,"avatar_url":"https://avatars.githubusercontent.com/u/73019?v=3","gravatar_id":"","url":"https://api.github.com/users/mboersma","html_url":"https://github.com/mboersma","followers_url":"https://api.github.com/users/mboersma/followers","following_url":"https://api.github.com/users/mboersma/following{/other_user}","gists_url":"https://api.github.com/users/mboersma/gists{/gist_id}","starred_url":"https://api.github.com/users/mboersma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mboersma/subscriptions","organizations_url":"https://api.github.com/users/mboersma/orgs","repos_url":"https://api.github.com/users/mboersma/repos","events_url":"https://api.github.com/users/mboersma/events{/privacy}","received_events_url":"https://api.github.com/users/mboersma/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":69,"state":"open","created_at":"2015-05-07T16:37:37Z","updated_at":"2015-07-01T22:46:30Z","due_on":"2015-07-07T06:00:00Z","closed_at":null},"comments":4,"created_at":"2015-06-08T21:16:54Z","updated_at":"2015-07-01T22:46:30Z","closed_at":"2015-07-01T22:46:30Z","body":"#### Backend\r\n\r\n- [ ] There is a partial fleet stub already done. We should finish the stub and add tests for all fleet operations.\r\n\r\n#### Client\r\n\r\n- [x] ~~I think we should move the command line parsing from CMD to client, and then call CMD with the parsed values. This will make it easier for us to test the CMD package and separate concerns.~~ #3831\r\n\r\n#### CMD\r\n\r\n- [x] ~~Currently there is a partial stub of the backend. We should finish this stub and add tests for all the deisctl operations.~~ #3860\r\n\r\n#### Config\r\n\r\n- [x] ~~ETCD should probably be broken out into its own sub-package. ETCD could be useful out of the config package, for example, for a future `deisctl backup`.~~ I decided against this. ETCD is already easily accessible through the config package. \r\n\r\n- [x] ~~Config has almost no tests. The etcd client could be stubbed or mocked, allowing us to properly test the rest of the config methods.~~ #3859\r\n\r\n#### Thoughts\r\n\r\n- We have thrown around the idea of moving away from docopt. Whether or not we decide to do that, most of my suggestions should still hold up, we will still need to put more work into mocking and stubbing the backend.\r\n\r\n- Mocking vs Stubbing: Currently all the deisctl tests use stubbing on things like fleet and the backend. I think that mocks might be less work than reimplementing the entire backend. I'm not very experienced with go testing, so you guys would know better than I what the best approach would be. \r\n\r\n- This is just stuff I saw and is primarily my own opinion. I'd really like advice on whether these actions make sense or if I missed a area to improve testing."},"comment":{"url":"https://api.github.com/repos/deis/deis/issues/comments/117844018","html_url":"https://github.com/deis/deis/issues/3820#issuecomment-117844018","issue_url":"https://api.github.com/repos/deis/deis/issues/3820","id":117844018,"user":{"login":"Joshua-Anderson","id":3526404,"avatar_url":"https://avatars.githubusercontent.com/u/3526404?v=3","gravatar_id":"","url":"https://api.github.com/users/Joshua-Anderson","html_url":"https://github.com/Joshua-Anderson","followers_url":"https://api.github.com/users/Joshua-Anderson/followers","following_url":"https://api.github.com/users/Joshua-Anderson/following{/other_user}","gists_url":"https://api.github.com/users/Joshua-Anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/Joshua-Anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joshua-Anderson/subscriptions","organizations_url":"https://api.github.com/users/Joshua-Anderson/orgs","repos_url":"https://api.github.com/users/Joshua-Anderson/repos","events_url":"https://api.github.com/users/Joshua-Anderson/events{/privacy}","received_events_url":"https://api.github.com/users/Joshua-Anderson/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T22:46:30Z","updated_at":"2015-07-01T22:46:30Z","body":"Yes. Done!"}}