test(shorebird_cli): stop generating diff file during test runs (#2053)
This commit is contained in:
@@ -483,8 +483,9 @@ void main() {
|
||||
final zipFile = invocation.namedArguments[#zipFile] as File;
|
||||
final outDir =
|
||||
invocation.namedArguments[#outputDirectory] as Directory;
|
||||
File(p.join(outDir.path, '${p.basename(zipFile.path)}.zip'))
|
||||
.createSync();
|
||||
File(
|
||||
p.join(outDir.path, '${p.basename(zipFile.path)}.zip'),
|
||||
).createSync();
|
||||
});
|
||||
when(() => artifactManager.getXcarchiveDirectory()).thenReturn(
|
||||
Directory(
|
||||
|
||||
@@ -54,8 +54,9 @@ void main() {
|
||||
|
||||
cacheArtifactDirectory = Directory.systemTemp.createTempSync();
|
||||
cache = MockCache();
|
||||
when(() => cache.getArtifactDirectory(any()))
|
||||
.thenReturn(cacheArtifactDirectory);
|
||||
when(
|
||||
() => cache.getArtifactDirectory(any()),
|
||||
).thenReturn(cacheArtifactDirectory);
|
||||
when(() => cache.updateAll()).thenAnswer((_) async {});
|
||||
});
|
||||
|
||||
@@ -64,8 +65,9 @@ void main() {
|
||||
final releaseArtifactFile = File(
|
||||
p.join(tmpDir.path, 'release_artifact'),
|
||||
)..createSync(recursive: true);
|
||||
final patchArtifactFile = File(p.join(tmpDir.path, 'patch_artifact'))
|
||||
..createSync(recursive: true);
|
||||
final patchArtifactFile = File(
|
||||
p.join(tmpDir.path, 'patch_artifact'),
|
||||
)..createSync(recursive: true);
|
||||
|
||||
await runWithOverrides(
|
||||
() => patchExecutable.run(
|
||||
@@ -96,6 +98,14 @@ void main() {
|
||||
when(() => patchProcessResult.stderr).thenReturn(stderr);
|
||||
when(() => patchProcessResult.stdout).thenReturn(stdout);
|
||||
|
||||
when(
|
||||
() => shorebirdProcess.run(
|
||||
any(that: endsWith('patch')),
|
||||
any(),
|
||||
runInShell: any(named: 'runInShell'),
|
||||
),
|
||||
).thenAnswer((_) async => patchProcessResult);
|
||||
|
||||
await expectLater(
|
||||
() => runWithOverrides(
|
||||
() => patchExecutable.run(
|
||||
|
||||
Reference in New Issue
Block a user