Keep x11vnc alive for remote login

This commit is contained in:
jjbrunton committed 2026-08-08 15:16:51 +01:00
1 parent 89f7376b1b
commit 51438aa5db
2 files changed
+38 -1

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import fs from 'node:fs';
import path from 'node:path';
import { describe, expect, it } from 'vitest';
describe('VNC container entrypoint', () => {
it('starts x11vnc with supported arguments and verifies its port before noVNC', () => {
const script = fs.readFileSync(path.resolve('docker/entrypoint.sh'), 'utf8');
expect(script).not.toContain('-nopw_warn');
expect(script).toContain('kill -0 "${X11VNC_PID}"');
expect(script).toContain('/dev/tcp/127.0.0.1/${VNC_PORT}');
expect(script.indexOf('VNC server is ready')).toBeLessThan(
script.indexOf('starting noVNC'),
);
});
});