Skip to content

Commit 276edc6

Browse files
committed
corrects validateIntegrityInformation function, fixes duplicate entries in failingTables
1 parent ba53820 commit 276edc6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vulndb/integrity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ func validateIntegrityInformation(workingDir string, groundTruth integrityInform
111111
found := false
112112
for _, tableGroundTruth := range groundTruth.TableIntegrity {
113113
if tableGroundTruth.TableName == tableIntegrity.TableName {
114+
found = true
114115
if !tableIntegrity.isEqual(tableGroundTruth) {
115116
slog.Error("invalid checksum when importing", "table", tableIntegrity.TableName, "expectedCount", tableGroundTruth.TotalCount, "actualCount", tableIntegrity.TotalCount, "expectedChecksum", fmt.Sprintf("%x", tableGroundTruth.Checksum), "actualChecksum", fmt.Sprintf("%x", tableIntegrity.Checksum))
116117
failingTables = append(failingTables, tableIntegrity.TableName)
117118
} else {
118-
found = true
119119
break
120120
}
121121
}

0 commit comments

Comments
 (0)