fix(shorebird_cli): ensure flutter artifacts are installed in shorebird preview (#1812)
This commit is contained in:
@@ -304,6 +304,8 @@ class PreviewCommand extends ShorebirdCommand {
|
||||
required DeploymentTrack track,
|
||||
String? deviceId,
|
||||
}) async {
|
||||
await iosDeploy.installIfNeeded();
|
||||
|
||||
const platform = ReleasePlatform.ios;
|
||||
final runnerDirectory = Directory(
|
||||
getArtifactPath(
|
||||
|
||||
@@ -976,6 +976,7 @@ channel: ${track.channel}
|
||||
device: any(named: 'device'),
|
||||
),
|
||||
).thenAnswer((_) async => ExitCode.success.code);
|
||||
when(() => iosDeploy.installIfNeeded()).thenAnswer((_) async {});
|
||||
when(
|
||||
() => iosDeploy.installAndLaunchApp(
|
||||
bundlePath: any(named: 'bundlePath'),
|
||||
@@ -1002,6 +1003,11 @@ channel: ${track.channel}
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('app_id: $appId', flush: true);
|
||||
|
||||
test('ensures ios-deploy is installed', () async {
|
||||
await runWithOverrides(command.run);
|
||||
verify(() => iosDeploy.installIfNeeded()).called(1);
|
||||
});
|
||||
|
||||
test('exits with code 70 when querying for release artifact fails',
|
||||
() async {
|
||||
final exception = Exception('oops');
|
||||
|
||||
Reference in New Issue
Block a user