Files
Genarrative/scripts/tsingnova-home-route.test.ts
T
kdletters 05bf69f2c2
Project CI / AI game creator shell Rust crates (push) Has been cancelled
Project CI / Backend tests (push) Has been cancelled
Project CI / Native shell tests (push) Has been cancelled
Project CI / Frontend tests (push) Has been cancelled
Project CI / Repository checks (push) Has been cancelled
Project CI / AI game creator shell web tests (push) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (push) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (push) Has been cancelled
Project CI / AI game creator shell Rust smoke (push) Has been cancelled
修复清智创游官网引擎下载接口路由
新增 tsingnovagames.com 独立 Nginx vhost 并代理 /api 到 api-server
补充官网 /home/ 静态首页与下载接口回归测试
同步生产运维验收与排障说明
2026-09-30 14:18:12 +08:00

29 lines
1.1 KiB
TypeScript

import { readFileSync } from 'node:fs';
import { describe, expect, it } from 'vitest';
const productionNginx = readFileSync('deploy/nginx/genarrative.conf', 'utf8');
const provisionScript = readFileSync(
'scripts/jenkins-server-provision.sh',
'utf8',
);
describe('清智创游官网引擎下载路由', () => {
it('生产 Nginx 为官网域名提供独立 vhost 和 API 反代', () => {
expect(productionNginx).toContain(
'server_name tsingnovagames.com www.tsingnovagames.com;',
);
expect(productionNginx).toMatch(
/server_name tsingnovagames\.com www\.tsingnovagames\.com;[\s\S]*?location ~ \^\/api\(\?:\/\|\$\)[\s\S]*?proxy_pass http:\/\/genarrative_api;/u,
);
expect(productionNginx).toContain('try_files /home/index.html =404;');
expect(productionNginx).toContain('location ^~ /home/');
});
it('Server-Provision 会把正式证书路径渲染进官网 vhost', () => {
expect(provisionScript).toContain(
's|/etc/letsencrypt/live/genarrative.example.com/|/etc/letsencrypt/live/${SERVER_NAME}/|g',
);
});
});