mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
fix(editor): Do not send health checks in preview (no-changelog) (#26484)
This commit is contained in:
parent
edd0c9f0d1
commit
9a84403d2f
|
|
@ -92,4 +92,22 @@ describe('useBackendStatus', () => {
|
|||
|
||||
expect(mockStopHeartbeat).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should skip health checks in preview mode', async () => {
|
||||
settingsStore.setSettings(
|
||||
merge({}, defaultSettings, {
|
||||
previewMode: true,
|
||||
endpointHealth: '/internal/health',
|
||||
}),
|
||||
);
|
||||
|
||||
const wrapper = createWrapper();
|
||||
|
||||
await vi.waitFor(() => {
|
||||
expect(mockFetch).not.toHaveBeenCalled();
|
||||
expect(mockStartHeartbeat).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
wrapper.unmount();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ export function useBackendStatus() {
|
|||
});
|
||||
|
||||
onMounted(() => {
|
||||
if (settingsStore.isPreviewMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Initial health check and start polling
|
||||
void updateOnlineStatus();
|
||||
startHeartbeat();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user