host address retrieving through assigned subnet information and broadcast message to learn host address
This commit is contained in:
@@ -189,8 +189,24 @@ void main() {
|
||||
});
|
||||
|
||||
test(
|
||||
'falls back to the default mLRS bridge IP when neither a host is '
|
||||
'configured nor a gateway address is reported',
|
||||
'uses the reported subnet broadcast address as initial peer when no '
|
||||
'host is configured and no gateway address is reported',
|
||||
() async {
|
||||
final fake = FakeMlrsNetworkController();
|
||||
final transport = await connectWithFake(
|
||||
fake,
|
||||
event: const MlrsNetworkAvailable(broadcastAddress: '192.168.4.255'),
|
||||
);
|
||||
|
||||
expect(transport.peerDescription, startsWith('192.168.4.255'));
|
||||
|
||||
transport.dispose();
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'falls back to the default mLRS bridge IP when neither a host, a '
|
||||
'gateway address, nor a broadcast address is reported',
|
||||
() async {
|
||||
final fake = FakeMlrsNetworkController();
|
||||
final transport = await connectWithFake(fake);
|
||||
|
||||
Reference in New Issue
Block a user