123456789101112131415161718192021222324252627282930313233 |
- import {MyRouter} from "@src/MyRouter";
- import {Models} from "@src/models/Models";
- import {ServiceApp} from "@core/App";
- import path from "path";
- import {acs_module_test} from "@root/pmr-access-control/__test/acs_module.test";
- import {acs_application_test} from "@root/pmr-access-control/__test/acs_application.test";
- import {acs_function_test} from "@root/pmr-access-control/__test/acs_function.test";
- import {acs_domain_test} from "@root/pmr-access-control/__test/acs_domain.test";
- import {acs_role_test} from "@root/pmr-access-control/__test/acs_role.test";
- import {acs_user_test} from "@root/pmr-access-control/__test/acs_user.test";
- const globalAny: any = global;
- describe('siot test', () => {
- process.env.TEST = 'true';
- globalAny.user_id = 'admin';
- beforeAll(async () => {
- let svr = new ServiceApp(path.join(process.cwd(), "config_test.json"));
- await svr.start(new MyRouter('@src/routes', []), Models, undefined, true);
- globalAny.app = svr.app;
- globalAny.svr = svr;
- }, 30000);
- afterAll(async () => {
- globalAny.svr.stopSvr();
- })
- // describe('应用管理', acs_application_test);
- // describe('功能模块管理', acs_module_test);
- // describe('功能项管理', acs_function_test);
- // describe('组织机构管理', acs_domain_test);
- // describe('角色管理', acs_role_test);
- describe('用户管理', acs_user_test);
- });
|