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.

Verify reviewed guest drawers without importing unowned PR history

pulse-triage[bot]23409e4f7fd3
diff --git a/frontend-modern/browser-tests/backup-completion-time.cjs b/frontend-modern/browser-tests/backup-completion-time.cjs
index fbded91e7a..cd623947a2 100644
--- a/frontend-modern/browser-tests/backup-completion-time.cjs
+++ b/frontend-modern/browser-tests/backup-completion-time.cjs
@@ -3,6 +3,9 @@ const path = require('node:path');
const crypto = require('node:crypto');
const assert = require('node:assert/strict');
const { chromium, webkit } = require('playwright');
+const {
+ createPublicationFixtureServer,
+} = require('/workspace/frontend-modern/browser-tests/publication-fixture-server.cjs');
const root = '/workspace';
const frontend = path.join(root, 'frontend-modern');
const output = path.join(root, 'tmp/backup-completion-time/browser');
@@ -17,7 +20,6 @@ const runtime = [
];
const hash = (bytes) => crypto.createHash('sha256').update(bytes).digest('hex');
const result = {
- base: '60bd0ffc621436e036e80140c85a687fcbae3cfa',
sourceHashes: Object.fromEntries(
runtime.map((p) => [p, hash(fs.readFileSync(path.join(root, p)))]),
),
@@ -42,20 +44,14 @@ let server;
'node_modules/@playwright/test'
].version,
);
- const { createServer } = await import(
- path.join(frontend, 'node_modules/vite/dist/node/index.js')
+ server = createPublicationFixtureServer(
+ frontend,
+ 5298,
+ 'browser-tests/backup-completion-time.html',
);
- server = await createServer({
- root: frontend,
- configFile: path.join(frontend, 'vite.config.ts'),
- cacheDir: path.join(output, 'vite-cache'),
- optimizeDeps: { noDiscovery: true, include: ['solid-js', 'solid-js/web', '@solidjs/router'] },
- server: { host: '127.0.0.1', port: 5298, strictPort: true },
- logLevel: 'error',
- });
+ result.compiled = server.binding;
+ result.source_sha = server.binding.source_sha;
await server.listen();
- await server.transformRequest('/src/index.css');
- await server.transformRequest('/browser-tests/backup-completion-time.tsx');
for (const spec of [
{
name: 'desktop-west',
@@ -366,7 +362,11 @@ let server;
assert.equal(result.errors.length, 0);
assert.equal(result.consoleErrors.length, 0);
assert(!result.requests.some((r) => r.unmatched));
- for (const p of runtime) assert.equal(result.loaded[p], result.sourceHashes[p]);
+ for (const p of runtime)
+ assert.equal(
+ result.compiled.sources[p.replace('frontend-modern/', '')],
+ result.sourceHashes[p],
+ );
result.result = 'passed';
})()
.catch((e) => {
diff --git a/frontend-modern/browser-tests/guest-reading-help.cjs b/frontend-modern/browser-tests/guest-reading-help.cjs
index bb69900f80..8d7967b46e 100644
--- a/frontend-modern/browser-tests/guest-reading-help.cjs
+++ b/frontend-modern/browser-tests/guest-reading-help.cjs
@@ -4,7 +4,7 @@ const path = require('node:path');
const crypto = require('node:crypto');
const assert = require('node:assert/strict');
const { chromium, webkit } = require('playwright');
-const { createPublicationFixtureServer } = require('./publication-fixture-server.cjs');
+const { createPublicationFixtureServer } = require('/workspace/frontend-modern/browser-tests/publication-fixture-server.cjs');
const root = '/workspace/frontend-modern';
const output = '/workspace/tmp/guest-reading-help';
const origin = 'http://127.0.0.1:5331';
diff --git a/frontend-modern/browser-tests/publication-fixture-server.cjs b/frontend-modern/browser-tests/publication-fixture-server.cjs
index 748180cffa..f92a1a1164 100644
--- a/frontend-modern/browser-tests/publication-fixture-server.cjs
+++ b/frontend-modern/browser-tests/publication-fixture-server.cjs
@@ -14,6 +14,7 @@ const runtimePaths = [
'src/features/patrol/PatrolAttentionWorkbench.tsx',
];
const entryPaths = [
+ 'browser-tests/backup-completion-time.html',
'browser-tests/guest-disk-provenance.html',
'browser-tests/guest-reading-help.html',
'browser-tests/guest-row-memory-provenance.html',
@@ -23,6 +24,7 @@ const harnessPaths = [
'browser-tests/publication-fixture-source.cjs',
'browser-tests/build-publication-fixtures.mjs',
'browser-tests/publication-fixture-server.cjs',
+ 'browser-tests/backup-completion-time.cjs',
'browser-tests/guest-disk-provenance.cjs',
'browser-tests/guest-reading-help.cjs',
'browser-tests/guest-row-memory-provenance.cjs',
diff --git a/frontend-modern/browser-tests/publication-fixture-server.test.mjs b/frontend-modern/browser-tests/publication-fixture-server.test.mjs
index 7fa142727a..7f8bbcf4df 100644
--- a/frontend-modern/browser-tests/publication-fixture-server.test.mjs
+++ b/frontend-modern/browser-tests/publication-fixture-server.test.mjs
@@ -192,7 +192,10 @@ test('serves only verified bytes, explicit routes and GET/HEAD; closes the liste
assert.equal(js.body, 'assets/fixture.js');
assert.match(js.type, /javascript/);
assert.equal((await request('/assets/fixture.js', 'HEAD')).body, '');
- assert.equal((await request('/docs/VM_DISK_MONITORING')).body, entryPaths[1]);
+ assert.equal(
+ (await request('/docs/VM_DISK_MONITORING')).body,
+ 'browser-tests/guest-reading-help.html',
+ );
assert.match((await request('/docs/VM_DISK_MONITORING.md')).type, /markdown/);
for (const url of [
'/missing.js',