mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 09:11:13 +00:00
fix(pairing): allow emulator ws setup urls
This commit is contained in:
@@ -399,6 +399,21 @@ describe("pairing setup code", () => {
|
||||
urlSource: "gateway.bind=custom",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "allows android emulator cleartext setup urls",
|
||||
config: {
|
||||
gateway: {
|
||||
bind: "custom",
|
||||
customBindHost: "10.0.2.2",
|
||||
auth: { mode: "token", token: "tok_123" },
|
||||
},
|
||||
} satisfies ResolveSetupConfig,
|
||||
expected: {
|
||||
authLabel: "token",
|
||||
url: "ws://10.0.2.2:18789",
|
||||
urlSource: "gateway.bind=custom",
|
||||
},
|
||||
},
|
||||
] as const)("$name", async ({ config, options, expected }) => {
|
||||
await expectResolvedSetupSuccessCase({
|
||||
config,
|
||||
@@ -443,7 +458,7 @@ describe("pairing setup code", () => {
|
||||
options: {
|
||||
networkInterfaces: () => createIpv4NetworkInterfaces("192.168.1.20"),
|
||||
} satisfies ResolveSetupOptions,
|
||||
expectedError: "ws:// is only valid for localhost",
|
||||
expectedError: "ws:// is only valid for localhost or the Android emulator",
|
||||
},
|
||||
] as const)("$name", async ({ config, options, expectedError }) => {
|
||||
await expectResolvedSetupFailureCase({
|
||||
|
||||
Reference in New Issue
Block a user