mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-07-09 16:00:59 +00:00
Fix hosted relay onboarding test setup
- seed connected relay status before building mobile onboarding payloads
This commit is contained in:
parent
bf96c9cb08
commit
dd357c1ef3
1 changed files with 7 additions and 1 deletions
|
|
@ -168,12 +168,18 @@ func TestLoadRelayConfigForRuntime_DoesNotOverrideExplicitDisabledRelayConfig(t
|
|||
}
|
||||
|
||||
func TestHostedRelayRuntimeBuildsMobileOnboardingAppRelayURL(t *testing.T) {
|
||||
router, _, _ := newHostedRelayRuntimeTestRouter(t)
|
||||
router, _, instanceHost := newHostedRelayRuntimeTestRouter(t)
|
||||
|
||||
relayCfg, err := router.loadRelayConfigForRuntime(context.Background())
|
||||
if err != nil {
|
||||
t.Fatalf("loadRelayConfigForRuntime() error = %v", err)
|
||||
}
|
||||
router.relayClient = fakeRelayRuntimeClient{
|
||||
status: relay.ClientStatus{
|
||||
Connected: true,
|
||||
InstanceID: instanceHost,
|
||||
},
|
||||
}
|
||||
|
||||
req := httptest.NewRequest("GET", "https://t-hostedrelay01.cloud.pulserelay.pro/api/onboarding/qr", nil)
|
||||
payload, diagnostics := router.buildOnboardingPayload(req, relayCfg, "test-mobile-proof-token")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue