-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add missing AbandonChange, RebaseChange, RestoreChange and RevertChange #41
Conversation
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 17.94% 18.92% +0.97%
==========================================
Files 21 21
Lines 1750 1760 +10
==========================================
+ Hits 314 333 +19
+ Misses 1403 1393 -10
- Partials 33 34 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Unit tests would be a nice addition here. Up to you, feel free to merge if you want.
@andygrunwald, done! Most of changes.go is missing test coverage including the existing It would be better if we had a real instance of Gerrit to test against but until gerrittest is finished using the httptest works well for these kinds of changes. |
@opalmer Thanks for your effort.
True, i think because i was lazy. Sorry :(
Agree. And you are working somehow on it. So tests which is covered twice, doesn't hurt :) Thank you! I need to serve you a 🍺 or ☕️ or 🍸 some day |
No worries and I'm not trying to blame anyone :). Most parts of go-gerrit are being tested or used in other ways so the lack of coverage is not necessarily an indication that there's a real problem. I brought it up mainly because it's something that could be worked on is all.
Agreed.
The bits I'm finishing up in gerrittest right now are for another project that I'm hoping to open source soon-ish. It's basically a bot for Gerrit written in Go and since it's using go-gerrit under the hood I wanted to write gerrittest so I could do integration-like testing while at the same time solving #11.
Well if you're ever near the Atlanta area let me know, I owe you a drink too for writing go-gerrit in the first place 😄 |
Sounds good! What is this gerritbot doing? I had / started two projects in the past related to bots and gerrit. See https://github.com/andygrunwald/gotrap and https://github.com/andygrunwald/watson. |
Right now what it can do is:
In terms of how it works today:
It's already fairly close to a framework of sorts for interacting with Gerrit but I'm planning to modify the existing bot a bit before making it open source. Functionally it will be the same but I'm going to use go-plugin to connect parts of the bot together so it functions more like this:
I think output plugins will be fairly limited to common operations because a handler plugin could always do that work itself. The input plugins could do some caching/persistence but I'm trying to keep the core of the bot and the handler plugins event based if that makes any sense. |
Sounds great! |
Discovered AbandonChange was missing when I was working on Change.Abandon() in gerrittest. Figured I'd implement it in go-gerrit and the other missing functions too since they're nearly identical.