-
Notifications
You must be signed in to change notification settings - Fork 40
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
test: Expand commit query tests #541
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #541 +/- ##
===========================================
+ Coverage 54.71% 54.81% +0.09%
===========================================
Files 97 97
Lines 13174 13174
===========================================
+ Hits 7208 7221 +13
+ Misses 5297 5288 -9
+ Partials 669 665 -4
|
abe57fd
to
4391149
Compare
@@ -16,77 +16,25 @@ import ( | |||
testUtils "github.com/sourcenetwork/defradb/tests/integration" | |||
) | |||
|
|||
func TestQueryAllCommitsSingleDAG(t *testing.T) { | |||
// This test is for documentation reasons only. I do not see this |
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.
suggestion: The part starting with I do not
probably shouldn't be there as it's seems more like a note or a discussion point with the team.
Sorry, you will find a repeat of this comment quite often bellow.
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.
I agree :) And will remove them all lol
- Remove opinion-sentiment from code-docs
executeTestCase(t, test) | ||
} | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
executeTestCase(t, test) | ||
} | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
executeTestCase(t, test) | ||
} | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
testUtils "github.com/sourcenetwork/defradb/tests/integration" | ||
) | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
executeTestCase(t, test) | ||
} | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
testUtils "github.com/sourcenetwork/defradb/tests/integration" | ||
) | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
executeTestCase(t, test) | ||
} | ||
|
||
// This test is for documentation reasons only. I do not see this |
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.
Same as my previous comment for the I do not
part.
}`, | ||
}, | ||
}, | ||
ExpectedError: "ipld: could not find", |
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.
though: out of scope but we should probably take note to return a better error.
executeTestCase(t, test) | ||
} | ||
|
||
func TestQueryLatestCommitsWithDocKeyAndCompositeFieldId(t *testing.T) { |
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.
suggestion: maybe it would be helpful to document how C
relates to the composite field id.
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.
Will leave as is I think. 'C' is a pretty core part of Defra, and hopefully this test wont live for very long (the fact that 'C' works here is not wonderful and it looks like I have forgotten to mention that on this test.
- doc test asserting bad behaviour
4391149
to
ba102f7
Compare
ba102f7
to
e39b64b
Compare
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 👍
* Rename existing latest_commit tests * Expand latest commits tests * Rename commit with cid test * Expand commit tests * Rename all commits tests * Expand all commits tests * Reword time-travel test docs
Relevant issue(s)
Resolves #540
Description
Expands integration tests for commit queries. Similar to time-travel test PR, this includes a number of tests that are largely there to document behaviour I consider unusual - these tests have comments above the function declaration, when reviewing please feel super free to contradict any of the opinions expressed there.
Notable downside of this PR is that it will increase the pain of changing cid format etc., but until we look at reworking the mechanics of commit-related tests I dont see a way around that.
Tasks
Specify the platform(s) on which this was tested: