[Feature-10290] [API] Refactor org.apache.dolphinscheduler.api.controller.AccessTokenController#createToken api (#10301)
* add feature_10290 * fix dolphinscheduler-ui/pnpm-lock.yaml error * fix dolphinscheduler-ui/pnpm-lock.yaml error * fix incorrect dependency * fix incorrect dependency and unit test * fix unit test error * add dolphinscheduler-api/logs to .gitignore * add AccessTokenV2ControllerTest.java * fix AccessTokenV2ControllerTest error
This commit is contained in:
parent
3a9e67325e
commit
8c72552237
|
|
@ -48,6 +48,7 @@ dolphinscheduler-ui/node
|
|||
dolphinscheduler-common/sql
|
||||
dolphinscheduler-common/test
|
||||
dolphinscheduler-worker/logs
|
||||
dolphinscheduler-api/logs
|
||||
|
||||
# ------------------
|
||||
# pydolphinscheduler
|
||||
|
|
|
|||
|
|
@ -151,12 +151,6 @@
|
|||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<groupId>io.swagger</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ public class AppConfiguration implements WebMvcConfigurer {
|
|||
registry.addInterceptor(loginInterceptor())
|
||||
.addPathPatterns(LOGIN_INTERCEPTOR_PATH_PATTERN)
|
||||
.excludePathPatterns(LOGIN_PATH_PATTERN, REGISTER_PATH_PATTERN,
|
||||
"/swagger-resources/**", "/webjars/**", "/v2/**",
|
||||
"/swagger-resources/**", "/webjars/**", "/api-docs/**",
|
||||
"/doc.html", "/swagger-ui.html", "*.html", "/ui/**", "/error");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplicat
|
|||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
|
|
@ -39,19 +40,45 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
@ConditionalOnWebApplication
|
||||
@PropertySource("classpath:swagger.properties")
|
||||
public class SwaggerConfig implements WebMvcConfigurer {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
|
||||
.apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller")).paths(PathSelectors.any())
|
||||
public Docket createV1RestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("v1(current)")
|
||||
.apiInfo(apiV1Info())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.paths(PathSelectors.regex("^(?!/v2).*"))
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder().title("Dolphin Scheduler Api Docs").description("Dolphin Scheduler Api Docs")
|
||||
private ApiInfo apiV1Info() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Dolphin Scheduler Api Docs")
|
||||
.description("Dolphin Scheduler Api Docs")
|
||||
.version("V1")
|
||||
.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Docket createV2RestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.groupName("v2")
|
||||
.apiInfo(apiV2Info())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("org.apache.dolphinscheduler.api.controller"))
|
||||
.paths(PathSelectors.ant("/v2/**"))
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiV2Info() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("Dolphin Scheduler Api Docs")
|
||||
.description("Dolphin Scheduler Api Docs")
|
||||
.version("V2")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,8 +89,7 @@ public class AccessTokenController extends BaseController {
|
|||
@RequestParam(value = "expireTime") String expireTime,
|
||||
@RequestParam(value = "token", required = false) String token) {
|
||||
|
||||
Map<String, Object> result = accessTokenService.createToken(loginUser, userId, expireTime, token);
|
||||
return returnDataList(result);
|
||||
return accessTokenService.createToken(loginUser, userId, expireTime, token);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.api.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import org.apache.dolphinscheduler.api.aspect.AccessLogAnnotation;
|
||||
import org.apache.dolphinscheduler.api.dto.CreateTokenRequest;
|
||||
import org.apache.dolphinscheduler.api.dto.CreateTokenResponse;
|
||||
import org.apache.dolphinscheduler.api.exceptions.ApiException;
|
||||
import org.apache.dolphinscheduler.api.service.AccessTokenService;
|
||||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import static org.apache.dolphinscheduler.api.enums.Status.CREATE_ACCESS_TOKEN_ERROR;
|
||||
|
||||
/**
|
||||
* access token controller
|
||||
*/
|
||||
@Api(tags = "ACCESS_TOKEN_TAG")
|
||||
@RestController
|
||||
@RequestMapping("/v2/access-tokens")
|
||||
public class AccessTokenV2Controller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private AccessTokenService accessTokenService;
|
||||
|
||||
/**
|
||||
* create token
|
||||
*
|
||||
* @param loginUser login user
|
||||
* @param createTokenRequest createTokenRequest
|
||||
* @return CreateTokenResponse CreateTokenResponse
|
||||
*/
|
||||
@ApiOperation(value = "createToken", notes = "CREATE_TOKEN_NOTES")
|
||||
@PostMapping(consumes = {"application/json"})
|
||||
@ResponseStatus(HttpStatus.CREATED)
|
||||
@ApiException(CREATE_ACCESS_TOKEN_ERROR)
|
||||
@AccessLogAnnotation(ignoreRequestArgs = "loginUser")
|
||||
public CreateTokenResponse createToken(@ApiIgnore @RequestAttribute(value = Constants.SESSION_USER) User loginUser,
|
||||
@RequestBody CreateTokenRequest createTokenRequest) {
|
||||
Result result = accessTokenService.createToken(loginUser,
|
||||
createTokenRequest.getUserId(),
|
||||
createTokenRequest.getExpireTime(),
|
||||
createTokenRequest.getToken());
|
||||
return new CreateTokenResponse(result);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.api.dto;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class CreateTokenRequest {
|
||||
@ApiModelProperty(example = "1", required = true)
|
||||
Integer userId;
|
||||
|
||||
@ApiModelProperty(example = "2022-12-31 00:00:00", required = true)
|
||||
String expireTime;
|
||||
|
||||
@ApiModelProperty(example = "abc123xyz")
|
||||
String token;
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getExpireTime() {
|
||||
return expireTime;
|
||||
}
|
||||
|
||||
public void setExpireTime(String expireTime) {
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.api.dto;
|
||||
|
||||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.dao.entity.AccessToken;
|
||||
|
||||
public class CreateTokenResponse extends Result {
|
||||
private AccessToken data;
|
||||
|
||||
public CreateTokenResponse(Result result) {
|
||||
super();
|
||||
this.setCode(result.getCode());
|
||||
this.setMsg(result.getMsg());
|
||||
this.setData((AccessToken) result.getData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AccessToken getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(AccessToken data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ public interface AccessTokenService {
|
|||
* @param token token string (if it is absent, it will be automatically generated)
|
||||
* @return create result code
|
||||
*/
|
||||
Map<String, Object> createToken(User loginUser, int userId, String expireTime, String token);
|
||||
Result createToken(User loginUser, int userId, String expireTime, String token);
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -121,8 +121,8 @@ public class AccessTokenServiceImpl extends BaseServiceImpl implements AccessTok
|
|||
*/
|
||||
@SuppressWarnings("checkstyle:WhitespaceAround")
|
||||
@Override
|
||||
public Map<String, Object> createToken(User loginUser, int userId, String expireTime, String token) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
public Result createToken(User loginUser, int userId, String expireTime, String token) {
|
||||
Result result = new Result();
|
||||
|
||||
// 1. check permission
|
||||
if (!(canOperatorPermissions(loginUser,null, AuthorizationType.ACCESS_TOKEN,ACCESS_TOKEN_CREATE) || loginUser.getId() == userId)) {
|
||||
|
|
@ -132,7 +132,10 @@ public class AccessTokenServiceImpl extends BaseServiceImpl implements AccessTok
|
|||
|
||||
// 2. check if user is existed
|
||||
if (userId <= 0) {
|
||||
throw new IllegalArgumentException("User id should not less than or equals to 0.");
|
||||
String errorMsg = "User id should not less than or equals to 0.";
|
||||
logger.error(errorMsg);
|
||||
putMsg(result, Status.REQUEST_PARAMS_NOT_VALID_ERROR, errorMsg);
|
||||
return result;
|
||||
}
|
||||
|
||||
// 3. generate access token if absent
|
||||
|
|
@ -151,7 +154,7 @@ public class AccessTokenServiceImpl extends BaseServiceImpl implements AccessTok
|
|||
int insert = accessTokenMapper.insert(accessToken);
|
||||
|
||||
if (insert > 0) {
|
||||
result.put(Constants.DATA_LIST, accessToken);
|
||||
result.setData(accessToken);
|
||||
putMsg(result, Status.SUCCESS);
|
||||
} else {
|
||||
putMsg(result, Status.CREATE_ACCESS_TOKEN_ERROR);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
# (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
springfox.documentation.swagger.v2.path=/api-docs
|
||||
|
|
@ -89,11 +89,11 @@ public class AccessTokenControllerTest extends AbstractControllerTest {
|
|||
MvcResult mvcResult = mockMvc.perform(post("/access-tokens")
|
||||
.header("sessionId", sessionId)
|
||||
.params(paramsMap))
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(status().isCreated())
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andReturn();
|
||||
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
|
||||
Assert.assertEquals(Status.CREATE_ACCESS_TOKEN_ERROR.getCode(), result.getCode().intValue());
|
||||
Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR.getCode(), result.getCode().intValue());
|
||||
logger.info(mvcResult.getResponse().getContentAsString());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.dolphinscheduler.api.controller;
|
||||
|
||||
import org.apache.dolphinscheduler.api.enums.Status;
|
||||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.common.utils.JSONUtils;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
|
||||
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
|
||||
|
||||
/**
|
||||
* access token v2 controller test
|
||||
*/
|
||||
public class AccessTokenV2ControllerTest extends AbstractControllerTest {
|
||||
private static final Logger logger = LoggerFactory.getLogger(AccessTokenV2ControllerTest.class);
|
||||
|
||||
@Test
|
||||
public void testCreateToken() throws Exception {
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("userId", 1);
|
||||
paramsMap.put("expireTime", "2022-12-31 00:00:00");
|
||||
paramsMap.put("token", "607f5aeaaa2093dbdff5d5522ce00510");
|
||||
MvcResult mvcResult = mockMvc.perform(post("/v2/access-tokens")
|
||||
.header("sessionId", sessionId)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(JSONUtils.toJsonString(paramsMap)))
|
||||
.andExpect(status().isCreated())
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andReturn();
|
||||
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
|
||||
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
|
||||
logger.info(mvcResult.getResponse().getContentAsString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateTokenIfAbsent() throws Exception {
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("userId", 1);
|
||||
paramsMap.put("expireTime", "2022-12-31 00:00:00");
|
||||
paramsMap.put("token", null);
|
||||
|
||||
MvcResult mvcResult = this.mockMvc
|
||||
.perform(post("/v2/access-tokens")
|
||||
.header("sessionId", this.sessionId)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(JSONUtils.toJsonString(paramsMap)))
|
||||
.andExpect(status().isCreated())
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andReturn();
|
||||
|
||||
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
|
||||
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
|
||||
logger.info(mvcResult.getResponse().getContentAsString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testExceptionHandler() throws Exception {
|
||||
Map<String, Object> paramsMap = new HashMap<>();
|
||||
paramsMap.put("userId", -1);
|
||||
paramsMap.put("expireTime", "2022-12-31 00:00:00");
|
||||
paramsMap.put("token", "507f5aeaaa2093dbdff5d5522ce00510");
|
||||
MvcResult mvcResult = mockMvc.perform(post("/v2/access-tokens")
|
||||
.header("sessionId", sessionId)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(JSONUtils.toJsonString(paramsMap)))
|
||||
.andExpect(status().isCreated())
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andReturn();
|
||||
Result result = JSONUtils.parseObject(mvcResult.getResponse().getContentAsString(), Result.class);
|
||||
Assert.assertEquals(Status.REQUEST_PARAMS_NOT_VALID_ERROR.getCode(), result.getCode().intValue());
|
||||
logger.info(mvcResult.getResponse().getContentAsString());
|
||||
}
|
||||
}
|
||||
|
|
@ -40,6 +40,7 @@ import java.util.Calendar;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.dolphinscheduler.service.permission.ResourcePermissionCheckService;
|
||||
import org.assertj.core.util.Lists;
|
||||
|
|
@ -117,14 +118,14 @@ public class AccessTokenServiceTest {
|
|||
public void testCreateToken() {
|
||||
// Given Token
|
||||
when(accessTokenMapper.insert(any(AccessToken.class))).thenReturn(2);
|
||||
Map<String, Object> result = accessTokenService.createToken(getLoginUser(), 1, getDate(), "AccessTokenServiceTest");
|
||||
Result result = accessTokenService.createToken(getLoginUser(), 1, getDate(), "AccessTokenServiceTest");
|
||||
logger.info(result.toString());
|
||||
Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
|
||||
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
|
||||
|
||||
// Token is absent
|
||||
result = this.accessTokenService.createToken(getLoginUser(), 1, getDate(), null);
|
||||
logger.info(result.toString());
|
||||
Assert.assertEquals(Status.SUCCESS, result.get(Constants.STATUS));
|
||||
Assert.assertEquals(Status.SUCCESS.getCode(), result.getCode().intValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue