|
|
|
@ -1,11 +1,25 @@
|
|
|
|
|
import { connectionCanEdit } from '../app.service'; |
|
|
|
|
import { connectionCanEdit, resolveUrlInfo } from '../app.service'; |
|
|
|
|
const connection = { |
|
|
|
|
connectionId: '', |
|
|
|
|
connectionType: '', |
|
|
|
|
connectionName: '', |
|
|
|
|
connectionData: '', |
|
|
|
|
}; |
|
|
|
|
/** |
|
|
|
|
* test_author_alan |
|
|
|
|
*/ |
|
|
|
|
test('DEC-10992 数据连接名称带-', () => { |
|
|
|
|
expect(resolveUrlInfo('jdbc:sqlserver://192.168.17.111:1433;databaseName=L-Pick-DAS-MengYan')).toEqual({ |
|
|
|
|
host: '192.168.17.111', |
|
|
|
|
port: '1433', |
|
|
|
|
databaseName: 'L-Pick-DAS-MengYan', |
|
|
|
|
urlInfo: '', |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* test_author_alan |
|
|
|
|
*/ |
|
|
|
|
test('BI-51537 判断数据连接是否有权限', () => { |
|
|
|
|
expect(connectionCanEdit({ |
|
|
|
|
...connection, |
|
|
|
|