Skip to content

Commit 7e107a5

Browse files
authored
Reduce false reporting of isBlocked packages in integrity checks. (#8341)
1 parent bd33b48 commit 7e107a5

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

app/lib/shared/integrity.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class IntegrityChecker {
424424
isModerated: p.isModerated,
425425
moderatedAt: p.moderatedAt,
426426
);
427-
if (p.isModerated) {
427+
if (p.isModerated || p.isBlocked) {
428428
_packagesWithIsModeratedFlag.add(p.name!);
429429
}
430430

app/test/frontend/handlers/custom_api_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ void main() {
161161
'nextUrl': null,
162162
},
163163
);
164+
165+
// reverting to make sure integrity check is passing
166+
p.updateIsBlocked(isBlocked: false);
167+
await dbService.commit(inserts: [p]);
164168
});
165169
});
166170

app/test/frontend/handlers/documentation_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ void main() {
149149
await dbService.commit(inserts: [pkg!..updateIsBlocked(isBlocked: true)]);
150150
await expectNotFoundResponse(
151151
await issueGet('/documentation/oxygen/latest/'));
152+
153+
// reverting to make sure integrity check is passing
154+
await dbService.commit(inserts: [pkg..updateIsBlocked(isBlocked: false)]);
152155
});
153156
});
154157
}

app/test/frontend/handlers/package_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ void main() {
5454
await issueGet('/packages/oxygen/versions/${pkg.latestVersion}'));
5555
await expectNotFoundResponse(await issueGet(
5656
'/packages/oxygen/versions/${pkg.latestVersion}/score'));
57+
58+
// reverting to make sure integrity check is passing
59+
await dbService.commit(inserts: [pkg..updateIsBlocked(isBlocked: false)]);
5760
});
5861

5962
testWithProfile('/packages/foobar_not_found - not found', fn: () async {

0 commit comments

Comments
 (0)