Skip to content

Commit

Permalink
chore(artifact_proxy): remove legacy redirects (#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Apr 4, 2024
1 parent a61708c commit 9ec8b52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
10 changes: 0 additions & 10 deletions packages/artifact_proxy/lib/src/artifact_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,6 @@ String getFlutterArtifactLocation({
? artifactPath.replaceAll(r'$engine', engine)
: artifactPath;

final isChromeInfra = adjustedPath.contains('flutter_infra_release/cipd');

// TODO(felangel): remove this after 3.8 is released.
if (isChromeInfra) {
return adjustedPath.replaceAll(
'flutter_infra_release/cipd',
'https://chrome-infra-packages.appspot.com/dl',
);
}

return 'https://storage.googleapis.com/$adjustedPath';
}

Expand Down
17 changes: 0 additions & 17 deletions packages/artifact_proxy/test/artifact_proxy_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,6 @@ void main() {
verifyNever(() => client.getManifest(shorebirdEngineRevision));
});

test(
'should proxy to Flutter '
'when no override is found '
'and path is chrome infra', () async {
const path =
'flutter_infra_release/cipd/flutter/web/canvaskit_bundle/+/ztaLvbs5GPmlAwUosC7VVp7EQnNVknRpNuKdv7vmzaAC';
final request = buildRequest(path);
final response = await handler(request);
expect(
response,
isRedirectTo(
'https://chrome-infra-packages.appspot.com/dl/flutter/web/canvaskit_bundle/+/ztaLvbs5GPmlAwUosC7VVp7EQnNVknRpNuKdv7vmzaAC',
),
);
verifyNever(() => client.getManifest(any()));
});

test('should return explainer at /', () async {
const path = '/';
final request = buildRequest(path);
Expand Down

0 comments on commit 9ec8b52

Please sign in to comment.