@@ -132,8 +132,36 @@ Future<void> _testExportedApiSynchronization(
132132 isNotNull,
133133 );
134134 expect (
135- await bucket.readBytes ('$runtimeVersion /api/packages/foo/feed.atom' ),
136- isNotNull,
135+ await bucket.readGzippedJson ('$runtimeVersion /api/packages/foo/likes' ),
136+ {
137+ 'package' : 'foo' ,
138+ 'likes' : 0 ,
139+ },
140+ );
141+ expect (
142+ await bucket.readGzippedJson ('$runtimeVersion /api/packages/foo/options' ),
143+ {
144+ 'isDiscontinued' : false ,
145+ 'replacedBy' : null ,
146+ 'isUnlisted' : false ,
147+ },
148+ );
149+ expect (
150+ await bucket
151+ .readGzippedJson ('$runtimeVersion /api/packages/foo/publisher' ),
152+ {
153+ 'publisherId' : null ,
154+ },
155+ );
156+ expect (
157+ await bucket.readGzippedJson ('$runtimeVersion /api/packages/foo/score' ),
158+ {
159+ 'grantedPoints' : isNotNull,
160+ 'maxPoints' : isNotNull,
161+ 'likeCount' : isNotNull,
162+ 'tags' : isNotEmpty,
163+ 'lastUpdated' : isNotNull,
164+ },
137165 );
138166 expect (
139167 await bucket.readGzippedJson ('$runtimeVersion /api/packages/foo' ),
@@ -143,6 +171,10 @@ Future<void> _testExportedApiSynchronization(
143171 'versions' : hasLength (1 ),
144172 },
145173 );
174+ expect (
175+ await bucket.readString ('$runtimeVersion /api/packages/foo/feed.atom' ),
176+ contains ('v1.0.0 of foo' ),
177+ );
146178 expect (
147179 await bucket
148180 .readGzippedJson ('$runtimeVersion /api/package-name-completion-data' ),
@@ -156,10 +188,6 @@ Future<void> _testExportedApiSynchronization(
156188 await bucket.readString ('$runtimeVersion /feed.atom' ),
157189 contains ('v1.0.0 of foo' ),
158190 );
159- expect (
160- await bucket.readString ('$runtimeVersion /api/packages/foo/feed.atom' ),
161- contains ('v1.0.0 of foo' ),
162- );
163191 }
164192
165193 _log.info ('## New package' );
@@ -197,6 +225,22 @@ Future<void> _testExportedApiSynchronization(
197225 await bucket.readString ('latest/api/packages/foo/feed.atom' ),
198226 contains ('v1.0.0 of foo' ),
199227 );
228+ expect (
229+ await bucket.readGzippedJson ('latest/api/packages/foo/likes' ),
230+ isNotNull,
231+ );
232+ expect (
233+ await bucket.readGzippedJson ('latest/api/packages/foo/options' ),
234+ isNotNull,
235+ );
236+ expect (
237+ await bucket.readGzippedJson ('latest/api/packages/foo/publisher' ),
238+ isNotNull,
239+ );
240+ expect (
241+ await bucket.readGzippedJson ('latest/api/packages/foo/score' ),
242+ isNotNull,
243+ );
200244 // Note. that name completion data won't be updated until search caches
201245 // are purged, so we won't test that it is updated.
202246
@@ -444,6 +488,10 @@ Future<void> _testExportedApiSynchronization(
444488 await bucket.readGzippedJson ('latest/api/packages/bar' ),
445489 isNull,
446490 );
491+ expect (
492+ await bucket.readGzippedJson ('latest/api/packages/bar/options' ),
493+ isNull,
494+ );
447495 expect (
448496 await bucket.readGzippedJson ('latest/api/packages/feed.atom' ),
449497 isNull,
@@ -484,6 +532,10 @@ Future<void> _testExportedApiSynchronization(
484532 'versions' : hasLength (2 ),
485533 },
486534 );
535+ expect (
536+ await bucket.readGzippedJson ('latest/api/packages/bar/options' ),
537+ isNotNull,
538+ );
487539 expect (
488540 await bucket.readBytes ('latest/api/archives/bar-2.0.0.tar.gz' ),
489541 isNotNull,
0 commit comments