Skip to content
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

fix relationshipTest, add it to the solver, correct path in conversionTests #27

Merged
merged 1 commit into from
Oct 11, 2022

Conversation

armintaenzertng
Copy link
Collaborator

Signed-off-by: Armin Tänzer armin.taenzer@tngtech.com

…nTests

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
@armintaenzertng armintaenzertng force-pushed the adaptTestsAndDifferences branch from 4e59068 to ce505aa Compare October 11, 2022 07:56
@armintaenzertng
Copy link
Collaborator Author

fixes #26

Copy link
Collaborator

@nicoweidner nicoweidner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing CI 😃

Comment on lines +33 to +41
for (var relationshipType : RelationshipType.values()) {
if (relationshipType == RelationshipType.MISSING) {
continue;
}
fileB.addRelationship(
document.createRelationship(
fileA, relationshipType, String.format("comment on %s", relationshipType.name())));

}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a side remark (no need to change this): This could be done quite elegantly with a stream, using one filter to ignore the MISSING type and then a forEach

Comment on lines +18 to +20
static Checksum createSha1Checksum(IModelStore modelStore, String documentUri) throws InvalidSPDXAnalysisException {
return Checksum.create(modelStore, documentUri, ChecksumAlgorithm.SHA1, "d6a770ba38583ed4bb4525bd96e50461655d2758");
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it funny that we are always generating a hardcoded checksum value 😂 . But it's fine for the time being, as long as the actual value is irrelevant

@Builder.Default
Map<String, Comparisons.Tuple<?>> differences = Collections.emptyMap();
ArrayNode differences = (new ObjectMapper()).createArrayNode();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't create a new object mapper every time we need one. I created #28 to cover this, may require a little bit of thought

@armintaenzertng armintaenzertng merged commit b13d931 into master Oct 11, 2022
@armintaenzertng armintaenzertng deleted the adaptTestsAndDifferences branch October 11, 2022 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants