-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrity analysis should happen only integrity data is present
Signed-off-by: vithikashukla <[email protected]>
- Loading branch information
vithikashukla
committed
Oct 30, 2023
1 parent
a1ebb13
commit 18801d4
Showing
3 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -275,7 +275,7 @@ public void testIntegrityCheckWhenComponentHashIsMissing() { | |
} | ||
|
||
@Test | ||
public void testIntegrityCheckWithDataInDb() { | ||
public void testIntegrityAnalysisWillNotBePerformedIfNoIntegrityDataInResult() { | ||
// Create an active project with one component. | ||
final var projectA = qm.createProject("acme-app-a", null, "1.0.0", null, null, null, true, false); | ||
final var componentProjectA = new Component(); | ||
|
@@ -309,13 +309,7 @@ public void testIntegrityCheckWithDataInDb() { | |
inputTopic.pipeInput(new TestRecord<>("pkg:maven/foo/[email protected]", result, Instant.now())); | ||
|
||
IntegrityAnalysis analysis = qm.getIntegrityAnalysisByComponentUuid(c.getUuid()); | ||
assertThat(analysis.getIntegrityCheckStatus()).isEqualTo(IntegrityMatchStatus.HASH_MATCH_PASSED); | ||
assertThat(analysis.getMd5HashMatchStatus()).isEqualTo(IntegrityMatchStatus.HASH_MATCH_PASSED); | ||
assertThat(analysis.getSha1HashMatchStatus()).isEqualTo(IntegrityMatchStatus.HASH_MATCH_PASSED); | ||
assertThat(analysis.getSha256HashMatchStatus()).isEqualTo(IntegrityMatchStatus.COMPONENT_MISSING_HASH_AND_MATCH_UNKNOWN); | ||
assertThat(analysis.getSha512HashMatchStatus()).isEqualTo(IntegrityMatchStatus.COMPONENT_MISSING_HASH_AND_MATCH_UNKNOWN); | ||
assertThat(analysis.getUpdatedAt()).isNotNull(); | ||
assertThat(analysis.getComponent().getPurl().toString()).isEqualTo("pkg:maven/foo/[email protected]"); | ||
assertThat(analysis).isNull(); | ||
} | ||
|
||
@Test | ||
|