Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Fix hosted relay onboarding test setup

rcourtmandd357c1ef32d
diff --git a/internal/api/relay_hosted_runtime_test.go b/internal/api/relay_hosted_runtime_test.go
index f469d90a2a..17c6bae84b 100644
--- a/internal/api/relay_hosted_runtime_test.go
+++ b/internal/api/relay_hosted_runtime_test.go
@@ -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")