mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
[fuchsia] pm serve should not use the device address (#85341)
BUG: fxbug.dev/77566 BUG: https://github.com/flutter/flutter/issues/83609
This commit is contained in:
parent
def601ac17
commit
6dd9e8c153
@ -312,7 +312,7 @@ class FuchsiaDevice extends Device {
|
||||
}
|
||||
// Stop the app if it's currently running.
|
||||
await stopApp(package);
|
||||
final String host = await hostAddress;
|
||||
|
||||
// Find out who the device thinks we are.
|
||||
final int port = await globals.os.findFreePort();
|
||||
if (port == 0) {
|
||||
@ -357,7 +357,7 @@ class FuchsiaDevice extends Device {
|
||||
// Start up a package server.
|
||||
const String packageServerName = FuchsiaPackageServer.toolHost;
|
||||
fuchsiaPackageServer = FuchsiaPackageServer(
|
||||
packageRepo.path, packageServerName, host, port);
|
||||
packageRepo.path, packageServerName, '', port);
|
||||
if (!await fuchsiaPackageServer.start()) {
|
||||
globals.printError('Failed to start the Fuchsia package server');
|
||||
return LaunchResult.failed();
|
||||
|
@ -229,14 +229,13 @@ void main() {
|
||||
Artifacts: () => artifacts,
|
||||
FileSystem: () => memoryFileSystem,
|
||||
ProcessManager: () => FakeProcessManager.any(),
|
||||
FuchsiaDeviceTools: () => fuchsiaDeviceTools,
|
||||
FuchsiaArtifacts: () => FuchsiaArtifacts(sshConfig: null),
|
||||
OperatingSystemUtils: () => osUtils,
|
||||
});
|
||||
|
||||
testUsingContext('fail when cant get host address', () async {
|
||||
expect(() async =>
|
||||
setupAndStartApp(prebuilt: true, mode: BuildMode.release),
|
||||
FuchsiaDeviceWithFakeDiscovery('123').hostAddress,
|
||||
throwsToolExit(message: 'Failed to get local address, aborting.'));
|
||||
}, overrides: <Type, Generator>{
|
||||
Artifacts: () => artifacts,
|
||||
|
Loading…
Reference in New Issue
Block a user