-
Notifications
You must be signed in to change notification settings - Fork 314
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
Minor package curation test simplifications #9673
base: main
Are you sure you want to change the base?
Conversation
8363074
to
2cf6306
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9673 +/- ##
=========================================
Coverage 68.10% 68.10%
Complexity 1294 1294
=========================================
Files 249 249
Lines 8841 8841
Branches 922 922
=========================================
Hits 6021 6021
Misses 2432 2432
Partials 388 388
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
2cf6306
to
3ec38e7
Compare
@@ -228,7 +190,7 @@ class PackageCurationTest : WordSpec({ | |||
) | |||
|
|||
val curation = PackageCuration( | |||
id = Identifier.EMPTY, | |||
id = pkg.id.copy(type = "${pkg.id.type}Suffix}"), |
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.
Why does this need to be non-empty now, which is a bit of the opposite of the other changes?
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.
The test name should explain this: fail if identifiers do not match
.
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.
Ok, but what confused me is that the curation id is derived from the package id by adding a suffix, which seemed like some similarity is needed. As the package id is anyway empty now, can we instead set the curation id to something like Identifier.EMPTY.copy(type = "Unmatched")
to make the intention explicit?
3ec38e7
to
211a0d9
Compare
211a0d9
to
07ae2da
Compare
@@ -228,7 +190,7 @@ class PackageCurationTest : WordSpec({ | |||
) | |||
|
|||
val curation = PackageCuration( | |||
id = Identifier.EMPTY, | |||
id = pkg.id.copy(type = "${pkg.id.type}Suffix}"), |
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.
Ok, but what confused me is that the curation id is derived from the package id by adding a suffix, which seemed like some similarity is needed. As the package id is anyway empty now, can we instead set the curation id to something like Identifier.EMPTY.copy(type = "Unmatched")
to make the intention explicit?
binaryArtifact = RemoteArtifact.EMPTY, | ||
sourceArtifact = RemoteArtifact.EMPTY, | ||
vcs = VcsInfo.EMPTY, | ||
val pkg = Package.EMPTY.copy( |
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.
Nit: Use a one-liner as in line 210?
While at it, simplify code by using empty values where non-empty values are not required for the test. Signed-off-by: Frank Viernau <x9fviern@zeiss.com>
07ae2da
to
1c67348
Compare
No description provided.