fix(config): align default.yaml with server schema
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { readFileSync } from 'fs';
|
||||
import { parse } from 'yaml';
|
||||
|
||||
describe('config/default.yaml', () => {
|
||||
it('does not use deprecated server.tailscale_only key', () => {
|
||||
const raw = readFileSync('config/default.yaml', 'utf-8');
|
||||
const parsed = parse(raw) as any;
|
||||
|
||||
expect(parsed).toBeTruthy();
|
||||
expect(parsed.server).toBeTruthy();
|
||||
expect(parsed.server.tailscale_only).toBeUndefined();
|
||||
});
|
||||
|
||||
it('documents server.tailscale.* shape', () => {
|
||||
const raw = readFileSync('config/default.yaml', 'utf-8');
|
||||
const parsed = parse(raw) as any;
|
||||
|
||||
expect(parsed.server.tailscale).toBeTruthy();
|
||||
expect(typeof parsed.server.tailscale).toBe('object');
|
||||
expect(typeof parsed.server.tailscale.serve).toBe('boolean');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user