-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement missing methods in changesetResolver and add ChangesetStats #12753
Conversation
Codecov Report
@@ Coverage Diff @@
## main #12753 +/- ##
==========================================
+ Coverage 50.82% 50.91% +0.09%
==========================================
Files 1439 1440 +1
Lines 81094 81229 +135
Branches 6606 6552 -54
==========================================
+ Hits 41212 41361 +149
+ Misses 36328 36299 -29
- Partials 3554 3569 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
2 similar comments
Codecov Report
@@ Coverage Diff @@
## main #12753 +/- ##
==========================================
+ Coverage 50.82% 50.91% +0.09%
==========================================
Files 1439 1440 +1
Lines 81094 81229 +135
Branches 6606 6552 -54
==========================================
+ Hits 41212 41361 +149
+ Misses 36328 36299 -29
- Partials 3554 3569 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov Report
@@ Coverage Diff @@
## main #12753 +/- ##
==========================================
+ Coverage 50.82% 50.91% +0.09%
==========================================
Files 1439 1440 +1
Lines 81094 81229 +135
Branches 6606 6552 -54
==========================================
+ Hits 41212 41361 +149
+ Misses 36328 36299 -29
- Partials 3554 3569 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
You delete code everyday(🎊), when will we have negative lines of code? 🤔
@LawnGnome Went ahead and merged this, feel free to leave post-merge feedback! |
Note to reviewers: sorry about the diff! I split up some files (example:
resolvers/changesets.go
intoresolvers/changeset.go
andresolvers/changeset_connection.go
), removed old test data and old commented out tests. That makes it a bit hard to review, but I think this structure is much easier to manage in the future.This PR fixes #12642, #12648 and #12646 by:
resolvers.TestCampaigns
test, but not in a single test, but more manageable in the form of multiple tests:TestCampaignResolver
,TestChangesetResolver
,TestChangesetConnectionResolver
.ChangesetConnectionStats
, including repository permissions (seepermissions_test.go
).changesetResolver
that was introduced when we said that a changeset can now exist in an unpublished state.Now we have a much more solid and extensible layer of resolver tests, IMHO, that we can expand in the future. My goal here was not to go for 100% test coverage, but to test 70-80% and leave a structure that allows filling in more test cases (for merged changesets, for Bitbucket Server/Gitlab changesets, etc.)
In order to make the tests less noisy I copied over the helpers I used in
service_test.go
— is there a way we can de-duplicate those without running into import cycles? cc @LawnGnome