Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement-3558][API] Improve DataSourceServiceTest.java #3579

Merged
merged 9 commits into from
Aug 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public Result createDataSource(@ApiIgnore @RequestAttribute(value = Constants.SE
@RequestParam(value = "other") String other) {
logger.info("login user {} create datasource name: {}, note: {}, type: {}, host: {}, port: {}, database : {}, principal: {}, userName : {}, connectType: {}, other: {}",
loginUser.getUserName(), name, note, type, host, port, database, principal, userName, connectType, other);
String parameter = dataSourceService.buildParameter(name, note, type, host, port, database, principal, userName, password, connectType, other);
String parameter = dataSourceService.buildParameter(type, host, port, database, principal, userName, password, connectType, other);
Map<String, Object> result = dataSourceService.createDataSource(loginUser, name, note, type, parameter);
return returnDataList(result);
}
Expand Down Expand Up @@ -155,7 +155,7 @@ public Result updateDataSource(@ApiIgnore @RequestAttribute(value = Constants.SE
@RequestParam(value = "other") String other) {
logger.info("login user {} updateProcessInstance datasource name: {}, note: {}, type: {}, connectType: {}, other: {}",
loginUser.getUserName(), name, note, type, connectType, other);
String parameter = dataSourceService.buildParameter(name, note, type, host, port, database, principal, userName, password, connectType, other);
String parameter = dataSourceService.buildParameter(type, host, port, database, principal, userName, password, connectType, other);
Map<String, Object> dataSource = dataSourceService.updateDataSource(id, loginUser, name, note, type, parameter);
return returnDataList(dataSource);
}
Expand Down Expand Up @@ -280,7 +280,7 @@ public Result connectDataSource(@ApiIgnore @RequestAttribute(value = Constants.S
@RequestParam(value = "other") String other) {
logger.info("login user {}, connect datasource: {}, note: {}, type: {}, connectType: {}, other: {}",
loginUser.getUserName(), name, note, type, connectType, other);
String parameter = dataSourceService.buildParameter(name, note, type, host, port, database, principal, userName, password, connectType, other);
String parameter = dataSourceService.buildParameter(type, host, port, database, principal, userName, password, connectType, other);
Boolean isConnection = dataSourceService.checkConnection(type, parameter);
Result result = new Result();

Expand Down Expand Up @@ -310,7 +310,7 @@ public Result connectionTest(@ApiIgnore @RequestAttribute(value = Constants.SESS
@RequestParam("id") int id) {
logger.info("connection test, login user:{}, id:{}", loginUser.getUserName(), id);

Boolean isConnection = dataSourceService.connectionTest(loginUser, id);
Boolean isConnection = dataSourceService.connectionTest(id);
Result result = new Result();

if (isConnection) {
Expand Down Expand Up @@ -361,7 +361,7 @@ public Result verifyDataSourceName(@ApiIgnore @RequestAttribute(value = Constant
logger.info("login user {}, verfiy datasource name: {}",
loginUser.getUserName(), name);

return dataSourceService.verifyDataSourceName(loginUser, name);
return dataSourceService.verifyDataSourceName(name);
}


Expand Down
Loading