-
Notifications
You must be signed in to change notification settings - Fork 33
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 sure we test issue deduplication #399
Comments
hey, can I work on this? |
Sure! Regarding your question on Slack:
issues=[
dict(id="_:1", origin="_", version=1),
dict(id="_:2", origin="_", version=1),
dict(id="_:3", origin="_", version=1),
dict(id="_:4", origin="_", version=1),
]
I'm not sure what you're asking exactly, but the issues don't have to have any data beyond the required properties (which you have in the code above). This test would be about deduplication only.
Yes, loading this data is enough for the first case. However, you have to plan how you're going to be separating data between particular test cases. You need to either empty the database between each, or only check for issues with particular IDs (as opposed to checking the complete contents). Your querying call is incorrect, though. It should be something like |
this was the code in the file. I send it as a reference.
Is this will be something like this if we talk about particular IDs.
|
The latest database and I/O schema versions have added support for "issues" and "incidents". Out of those two "issues" required a potentially-disruptive change, because they have two columns in their primary keys:
id
andversion
. As such, the deduplication mechanism should handle them differently from other objects, i.e. allow keeping issues with the sameid
field value, but differentversion
values in the database at the same time. This is different from the rest of the objects, which all can differ in theirid
field only.Make sure we have tests in
kcidb/test_db.py
that:load()
two issues with the sameid
/version
pair and check that only one ends up in the database (using either thequery()
or thedump()
method);load()
two issues with the sameid
, but differentversion
field values, and check that both are there in the database (using the same method);load()
two issues with the sameversion
, but differentid
field values, and check the same;load()
two issues with bothid
andversion
different, and check the same.Either prove tests like that already exist, or make sure they don't and add your own.
The text was updated successfully, but these errors were encountered: