@@ -211,8 +211,10 @@ void main() {
211
211
212
212
test ('calls the right processes' , () async {
213
213
final String releasesName = 'releases_$platformName .json' ;
214
- final String archivePath = path.join (tempDir.absolute.path, 'output_archive' );
215
- final String gsArchivePath = 'gs://flutter_infra/releases/dev/$platformName /output_archive' ;
214
+ final String archiveName = platform.isWindows ? 'archive.zip' : 'archive.tar.xz' ;
215
+ final String archiveMime = platform.isWindows ? 'application/zip' : 'application/x-gtar' ;
216
+ final String archivePath = path.join (tempDir.absolute.path, archiveName);
217
+ final String gsArchivePath = 'gs://flutter_infra/releases/dev/$platformName /$archiveName ' ;
216
218
final String jsonPath = path.join (tempDir.absolute.path, releasesName);
217
219
final String gsJsonPath = 'gs://flutter_infra/releases/$releasesName ' ;
218
220
final String releasesJson = '''{
@@ -237,13 +239,13 @@ void main() {
237
239
''' ;
238
240
final Map <String , List <ProcessResult >> calls = < String , List <ProcessResult >> {
239
241
'gsutil rm $gsArchivePath ' : null ,
240
- 'gsutil cp $archivePath $gsArchivePath ' : null ,
242
+ 'gsutil cp -h Content-Type:$ archiveMime $archivePath $gsArchivePath ' : null ,
241
243
'gsutil cat $gsJsonPath ' : < ProcessResult > [new ProcessResult (0 , 0 , releasesJson, '' )],
242
244
'gsutil rm $gsJsonPath ' : null ,
243
- 'gsutil cp $jsonPath $gsJsonPath ' : null ,
245
+ 'gsutil cp -h Content-Type:application/json $jsonPath $gsJsonPath ' : null ,
244
246
};
245
247
processManager.fakeResults = calls;
246
- final File outputFile = new File (path.join (tempDir.absolute.path, 'output_archive' ));
248
+ final File outputFile = new File (path.join (tempDir.absolute.path, archiveName ));
247
249
assert (tempDir.existsSync ());
248
250
final ArchivePublisher publisher = new ArchivePublisher (
249
251
tempDir,
@@ -264,7 +266,7 @@ void main() {
264
266
// Make sure new data is added.
265
267
expect (contents, contains ('"dev": "$testRef "' ));
266
268
expect (contents, contains ('"$testRef ": {' ));
267
- expect (contents, contains ('"${platformName }_archive": "dev/$platformName /output_archive "' ));
269
+ expect (contents, contains ('"${platformName }_archive": "dev/$platformName /$ archiveName "' ));
268
270
// Make sure existing entries are preserved.
269
271
expect (contents, contains ('"6da8ec6bd0c4801b80d666869e4069698561c043": {' ));
270
272
expect (contents, contains ('"f88c60b38c3a5ef92115d24e3da4175b4890daba": {' ));
0 commit comments