Skip to content

armgit / plexo

Public Imported from GitHub
0

Speed up downloads by combining multiple network connections in parallel

test: support subnet and interface kind in PLEXO_E2E_INTERFACES testKnob

yparshant6100aa779ed1a73
diff --git a/src/main/testKnobs.ts b/src/main/testKnobs.ts
index 82e485d..97a5d37 100644
--- a/src/main/testKnobs.ts
+++ b/src/main/testKnobs.ts
@@ -37,7 +37,18 @@ export function testInterfaces(): NetworkInterfaceInfo[] | null {
.split(',')
.filter(Boolean)
.map((entry) => {
- const [id, address] = entry.split('=')
- return { id, device: id, displayName: id, address, kind: 'ethernet' as const }
+ const [id, address, subnet, kind] = entry.split('=')
+ const inferredKind =
+ kind === 'wifi' || id.toLowerCase().includes('wi-fi') || id.toLowerCase().includes('wifi')
+ ? ('wifi' as const)
+ : ('ethernet' as const)
+ return {
+ id,
+ device: id,
+ displayName: id,
+ address,
+ kind: inferredKind,
+ subnet: subnet || undefined
+ }
})
}