22 lines
936 B
TypeScript
22 lines
936 B
TypeScript
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
|
|
describe('license-server 首装环境示例', () => {
|
|
const envExample = fs.readFileSync(path.join(__dirname, '..', '..', '.env.example'), 'utf8');
|
|
|
|
it('应该包含许可证请求签名密钥,避免 compose 首装时缺变量失败', () => {
|
|
expect(envExample).toContain('LICENSE_REQUEST_SIGNING_SECRET=');
|
|
});
|
|
|
|
it('应该包含付费模块镜像站配置,避免验证服务器承担模块本体下载', () => {
|
|
expect(envExample).toContain('PREMIUM_MODULE_REGISTRY_BASE=');
|
|
expect(envExample).toContain('PREMIUM_MODULE_VERSION=');
|
|
});
|
|
|
|
it('Compose 示例数据库地址应该使用 postgres 服务名', () => {
|
|
expect(envExample).toContain('@postgres:5432/license_db?schema=main');
|
|
expect(envExample).toContain('@postgres:5432/license_db?schema=public');
|
|
expect(envExample).not.toContain('@localhost:5432/license_db?schema=');
|
|
});
|
|
});
|