Skip to content

Commit d70e4e2

Browse files
committed
Updated sync_security_advisories_test.dart
1 parent d605557 commit d70e4e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/test/service/security_advisory/sync_security_advisories_test.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ void main() {
5252
expect(adv, isNull);
5353
});
5454

55-
testWithProfile('Sync with partial success', fn: () async {
55+
testWithProfile('Sync with partial success', expectedLogMessages: [
56+
'SHOUT [advisory-malformed] ID: GHSA-5678-5678-5678: Invalid modified date, cannot be a future date.',
57+
], fn: () async {
5658
// This directory contains 4 json files. One is with invalid json.
5759
// One contains invalid osv. The final two are valid security advisories.
5860
final dataDir3 = Directory(path.join(Directory.current.path, 'test',
@@ -66,7 +68,10 @@ void main() {
6668
expect(list.length, 2);
6769
});
6870

69-
testWithProfile('LatestAdvisory field gets updated on sync', fn: () async {
71+
testWithProfile('LatestAdvisory field gets updated on sync',
72+
expectedLogMessages: [
73+
'SHOUT [advisory-malformed] ID: GHSA-5678-5678-5678: Invalid modified date, cannot be a future date.',
74+
], fn: () async {
7075
var pkg = await packageBackend.lookupPackage('oxygen');
7176
expect(pkg!.latestAdvisory, isNull);
7277

0 commit comments

Comments
 (0)