-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make testable #8
Conversation
Was POST https://rocketchat.server/api/v1/login HTTP/1.1 1 1 map[Content-Type:[application/json]] {password=PASSWORD&user=USER} Now POST https://rocketchat.server/api/v1/login HTTP/1.1 1 1 map[Content-Type:[application/json]] {{"username":"USER","password":"PASSWORD"}}
Using multi pagkages makes forked development very hard, moved things round to have all in single pagkage * Added Doer - can pass this in * REST channels has good coverage * REST information has good coverage
Added missing tests for REST Included error tests
Added missing tests for REST Included error tests
Renamed channels tests
Extended the example to include a PostMessage
Most client methods are used by other func during tests Very simple tests only
Login and Logout
I have left some dead/unsed code that needs cleanup
First off thanks for your contribution!
Strongly disagree with this. By putting in a subpackage you are allowing that one package to be included where you may not want to include the entire sdk here. Its fundamental to go. Going to take a look at the rest of the code changes. Thanks again for contributing |
I have created another pull request that contains the change to make testing easer. (#13) |
I have done a large refactor to make development and testing easier.
Why have I made changes ?
sub-packages make it hard ! Having models in a sub-package makes it hard under the golang dependancy management to fork and work on changes, moving all in a single package solves this.
make testing easy I have added a http doer to the client , this allows for testing to include the response that you want to test with.
its a work in progress I have done a lot of changes, and some are still a bit messy. More work is needed
started to lint I find lint'ing of code very helpful
make lint
test coverage Have also added a compact way to look at test coverage
make test
Keen for your feedback,
Chris