Skip to content

Commit

Permalink
feat(artifact_proxy): add windows files (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanoltman authored Jan 7, 2025
1 parent 839719a commit 7f38e8f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
54 changes: 29 additions & 25 deletions packages/artifact_proxy/test/artifact_proxy_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,35 @@ void main() {
});

// artifact_proxy only runs on linux currently.
test('generate_manifest matches config', () async {
// Make a temp directory, run generate_manifest, parse the yaml
// and make sure all urls are handled.
const engineRevision = '8b89f8bd9fc6982aa9c4557fd0e5e89db1ff9986';
final result = Process.runSync('/bin/sh', [
'tool/generate_manifest.sh',
engineRevision,
]);
expect(result.exitCode, equals(0));
final manifest = checkedYamlDecode(
result.stdout as String,
(m) => ArtifactsManifest.fromJson(m!),
);
expect(manifest.artifactOverrides, isNotEmpty);

for (final pattern in manifest.artifactOverrides) {
final path = pattern.replaceAll(r'$engine', engineRevision);
final request = buildRequest(path);
final response = await handler(request);
expect(
response.statusCode,
isNot(HttpStatus.notFound),
reason: 'Pattern $pattern not handled',
test(
'generate_manifest matches config',
() async {
// Make a temp directory, run generate_manifest, parse the yaml
// and make sure all urls are handled.
const engineRevision = '8b89f8bd9fc6982aa9c4557fd0e5e89db1ff9986';
final result = Process.runSync('/bin/sh', [
'tool/generate_manifest.sh',
engineRevision,
]);
expect(result.exitCode, equals(0));
final manifest = checkedYamlDecode(
result.stdout as String,
(m) => ArtifactsManifest.fromJson(m!),
);
}
});
expect(manifest.artifactOverrides, isNotEmpty);

for (final pattern in manifest.artifactOverrides) {
final path = pattern.replaceAll(r'$engine', engineRevision);
final request = buildRequest(path);
final response = await handler(request);
expect(
response.statusCode,
isNot(HttpStatus.notFound),
reason: 'Pattern $pattern not handled',
);
}
},
onPlatform: {'windows': const Skip('needs bash')},
);
});
}
4 changes: 4 additions & 0 deletions packages/artifact_proxy/tool/generate_manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ artifact_overrides:
- flutter_infra_release/flutter/\$engine/darwin-x64-release/artifacts.zip
- flutter_infra_release/flutter/\$engine/darwin-x64-release/framework.zip
- flutter_infra_release/flutter/\$engine/darwin-x64-release/gen_snapshot.zip
# Windows release artifacts
- flutter_infra_release/flutter/\$engine/windows-x64/artifacts.zip
- flutter_infra_release/flutter/\$engine/windows-x64-release/windows-x64-flutter.zip

0 comments on commit 7f38e8f

Please sign in to comment.