File tree Expand file tree Collapse file tree
client-runtime/src/connection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2105,6 +2105,17 @@ describe("EnvironmentRegistry routes", () => {
21052105 expectedEnvironmentId : RELAY_TARGET . environmentId ,
21062106 } ;
21072107 yield * onboarding . registerPairing ( input ) ;
2108+ const connectProfiles = yield * Ref . get ( harness . storedProfiles ) ;
2109+ expect (
2110+ yield * onboarding
2111+ . registerPairing ( {
2112+ ...input ,
2113+ pairingUrl : input . host ,
2114+ pairingCode : "pairing-code" ,
2115+ } )
2116+ . pipe ( Effect . flip ) ,
2117+ ) . toMatchObject ( { _tag : "ConnectionBlockedError" , reason : "configuration" } ) ;
2118+ expect ( yield * Ref . get ( harness . storedProfiles ) ) . toEqual ( connectProfiles ) ;
21082119 yield * onboarding . registerPairing ( { ...input , pairingCode : "pairing-code" } ) ;
21092120 const pairedProfiles = yield * Ref . get ( harness . storedProfiles ) ;
21102121 const pairedCredentials = yield * Ref . get ( harness . storedCredentials ) ;
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ export const resolveRemoteAddressWithoutCredential = (input: {
254254} ) : { readonly httpBaseUrl : string ; readonly wsBaseUrl : string } | null => {
255255 const pairingUrl = input . pairingUrl ?. trim ( ) ?? "" ;
256256 const raw = ( pairingUrl || input . host ?. trim ( ) || "" ) . replace ( / ^ \/ + / , "" ) ;
257- if ( raw === "" || ( pairingUrl === "" && ( input . pairingCode ?. trim ( ) ?? "" ) !== "" ) ) return null ;
257+ if ( raw === "" || ( input . pairingCode ?. trim ( ) ?? "" ) !== "" ) return null ;
258258 let url : URL ;
259259 try {
260260 if ( / ^ [ a - z A - Z ] [ a - z A - Z \d + - ] * : \/ \/ / . test ( raw ) ) {
You can’t perform that action at this time.
0 commit comments