This is an automated email from the ASF dual-hosted git repository.
ykinash pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git
The following commit(s) were added to refs/heads/develop by this push:
new 5733491 [DATALAB] -- change build.version 2.4-2.5. Fixed tests. Fixed
bug with config page
5733491 is described below
commit 57334912f44f9358847337abc2341d3a05cd4369
Author: KinashYurii <[email protected]>
AuthorDate: Fri Jul 9 18:38:58 2021 +0300
[DATALAB] -- change build.version 2.4-2.5. Fixed tests. Fixed bug with
config page
---
build.properties | 2 +-
.../datalab/properties/ChangePropertiesConst.java | 8 ++---
.../properties/ChangePropertiesService.java | 38 +++++++---------------
.../handlers/ComputationalCallbackHandler.java | 3 --
.../response/handlers/EdgeCallbackHandler.java | 1 -
.../response/handlers/ProjectCallbackHandler.java | 5 ---
.../response/handlers/ResourceCallbackHandler.java | 3 --
.../handlers/dao/FileSystemCallbackHandlerDao.java | 1 -
.../resources/base/ExploratoryService.java | 3 --
.../resources/ChangePropertiesResource.java | 3 --
.../resources/callback/ComputationalCallback.java | 2 --
.../resources/callback/ProjectCallback.java | 3 --
.../service/impl/ComputationalServiceImpl.java | 7 ----
.../service/impl/ExploratoryServiceImpl.java | 1 -
.../impl/InfrastructureInfoServiceImpl.java | 5 ---
.../datalab/backendapi/util/RequestBuilder.java | 5 ---
.../service/impl/BillingServiceImplTest.java | 22 +++++++++----
.../service/impl/ComputationalServiceImplTest.java | 6 +++-
.../service/impl/EnvironmentServiceImplTest.java | 11 +++++--
.../service/impl/ExploratoryServiceImplTest.java | 31 +++++++++++++++---
.../InfrastructureTemplateServiceBaseTest.java | 22 ++++---------
.../service/impl/SystemInfoServiceImplTest.java | 2 +-
.../datalab/backendapi/util/CSVFormatterTest.java | 4 +--
23 files changed, 81 insertions(+), 107 deletions(-)
diff --git a/build.properties b/build.properties
index 275dfaa..622c600 100644
--- a/build.properties
+++ b/build.properties
@@ -16,4 +16,4 @@
# specific language governing permissions and limitations
# under the License.
#
-datalab.version=2.4
\ No newline at end of file
+datalab.version=2.5
\ No newline at end of file
diff --git
a/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesConst.java
b/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesConst.java
index d4a2c51..ea71207 100644
---
a/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesConst.java
+++
b/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesConst.java
@@ -23,15 +23,15 @@ public interface ChangePropertiesConst {
String GKE_SELF_SERVICE_PATH = "/root/self-service.yaml";
String GKE_SELF_SERVICE = "self-service.yaml";
String SELF_SERVICE = "self-service.yml";
- // String SELF_SERVICE_PROP_PATH =
"services/self-service/self-service.yml";
String SELF_SERVICE_PROP_PATH = "/opt/datalab/conf/self-service.yml";
+ // String SELF_SERVICE_PROP_PATH =
"services/self-service/self-service.yml";
String PROVISIONING_SERVICE = "provisioning.yml";
- // String PROVISIONING_SERVICE_PROP_PATH =
"services/provisioning-service/provisioning.yml";
String PROVISIONING_SERVICE_PROP_PATH =
"/opt/datalab/conf/provisioning.yml";
+// String PROVISIONING_SERVICE_PROP_PATH =
"services/provisioning-service/provisioning.yml";
String BILLING_SERVICE = "billing.yml";
String BILLING_SERVICE_PROP_PATH = "/opt/datalab/conf/billing.yml";
- // String BILLING_SERVICE_PROP_PATH =
"services/billing-gcp/billing.yml";
+ // String BILLING_SERVICE_PROP_PATH =
"services/billing-gcp/billing.yml";
// String BILLING_SERVICE_PROP_PATH =
"services/billing-azure/billing.yml";
// String BILLING_SERVICE_PROP_PATH = "services/billing-aws/billing.yml";
String GKE_BILLING_PATH = "/root/billing.yaml";
@@ -43,7 +43,7 @@ public interface ChangePropertiesConst {
String SELF_SERVICE_SUPERVISORCTL_RUN_NAME = " ui ";
String PROVISIONING_SERVICE_SUPERVISORCTL_RUN_NAME = " provserv ";
String BILLING_SERVICE_SUPERVISORCTL_RUN_NAME = " billing ";
- String SECRET_REGEX = "((.*)[sS]ecret(.*)|password): (.*)";
+ String SECRET_REGEX = "((.*)[sS]ecret(.*)|(p|P)assword): (.*)";
String USER_REGEX = " *(user|username): (.*)";
String SECRET_REPLACEMENT_FORMAT = " ***********";
String SUPERVISORCTL_RESTART_SH_COMMAND = "sudo supervisorctl restart";
diff --git
a/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesService.java
b/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesService.java
index 67f75b4..15aaa35 100644
---
a/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesService.java
+++
b/services/datalab-webapp-common/src/main/java/com/epam/datalab/properties/ChangePropertiesService.java
@@ -51,21 +51,16 @@ public class ChangePropertiesService {
public void writeFileFromString(String newPropFile, String serviceName,
String servicePath) {
- String oldFile = readFile(serviceName, servicePath);
- try (BufferedWriter writer = new BufferedWriter(new
FileWriter(servicePath))) {
- try {
- changeCHMODE(serviceName, servicePath,
ChangePropertiesConst.DEFAULT_CHMOD, ChangePropertiesConst.WRITE_CHMOD);
- log.info("Trying to overwrite {}, file for path {} :",
serviceName, servicePath);
- writer.write(addLicence());
- writer.write(checkAndReplaceSecretIfEmpty(newPropFile,
oldFile));
- log.info("{} overwritten successfully", serviceName);
- writer.close();
- changeCHMODE(serviceName, servicePath,
ChangePropertiesConst.WRITE_CHMOD, ChangePropertiesConst.DEFAULT_CHMOD);
- } catch (Exception e) {
- log.error("Failed during overwriting {}", serviceName);
- writer.write(oldFile);
- throw new
DynamicChangePropertiesException(String.format("Failed during overwriting %s",
serviceName));
- }
+ try {
+ changeCHMODE(serviceName, servicePath,
ChangePropertiesConst.DEFAULT_CHMOD, ChangePropertiesConst.WRITE_CHMOD);
+ String oldFile = readFile(serviceName, servicePath);
+ BufferedWriter writer = new BufferedWriter(new
FileWriter(servicePath));
+ log.info("Trying to overwrite {}, file for path {} :",
serviceName, servicePath);
+ writer.write(addLicence());
+ writer.write(checkAndReplaceSecretIfEmpty(newPropFile, oldFile));
+ log.info("{} overwritten successfully", serviceName);
+ writer.close();
+ changeCHMODE(serviceName, servicePath,
ChangePropertiesConst.WRITE_CHMOD, ChangePropertiesConst.DEFAULT_CHMOD);
} catch (IOException e) {
log.error("Failed to create writer with path {}", servicePath);
throw new DynamicChangePropertiesException(String.format("Failed
during overwriting %s", serviceName));
@@ -124,17 +119,8 @@ public class ChangePropertiesService {
secretsAndUsers.add(user);
}
for (String secretOrUser : secretsAndUsers) {
- int start = confWithReplacedSecretConf.indexOf(secretOrUser);
- int end = confWithReplacedSecretConf.indexOf("\n", start) - 1;
- boolean isTure;
- try {
- String s = confWithReplacedSecretConf.substring(start, end);
- isTure = s.equals(secretOrUser);
- } catch (StringIndexOutOfBoundsException e) {
- isTure = true;
- }
- if (isTure)
- confWithReplacedSecretConf =
confWithReplacedSecretConf.replace(secretOrUser,
ChangePropertiesConst.SECRET_REPLACEMENT_FORMAT);
+ String regex = "(" + secretOrUser + "\\b)";
+ confWithReplacedSecretConf =
confWithReplacedSecretConf.replaceAll(regex,
ChangePropertiesConst.SECRET_REPLACEMENT_FORMAT);
}
return confWithReplacedSecretConf;
}
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
index 99b5f0e..416eda7 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ComputationalCallbackHandler.java
@@ -75,15 +75,12 @@ public class ComputationalCallbackHandler extends
ResourceCallbackHandler<Comput
@Override
protected ComputationalStatusDTO parseOutResponse(JsonNode resultNode,
ComputationalStatusDTO baseStatus) {
- log.info("TEST LOG!!!: parseOutResponse :\n resultNode: {}",
resultNode);
if (resultNode == null) {
return baseStatus;
}
baseStatus.withComputationalUrl(extractUrl(resultNode));
baseStatus.withLastActivity(Date.from(Instant.now()));
- log.info("TEST LOG!!!: base status: {}", baseStatus);
- log.info("TEST LOG!!!: getAction: {}", getAction());
if (DockerAction.CREATE == getAction()) {
baseStatus
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/EdgeCallbackHandler.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/EdgeCallbackHandler.java
index af218c1..22ffa31 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/EdgeCallbackHandler.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/EdgeCallbackHandler.java
@@ -59,7 +59,6 @@ public class EdgeCallbackHandler<E extends EdgeInfo, T
extends UploadFileResult<
}
protected T parseOutResponse(JsonNode resultNode, T baseStatus) {
- log.info("TEST LOG!!!: edge callback: resultNode: {}, baseStatus: {}",
resultNode, baseStatus);
if (resultNode != null && (getAction() == DockerAction.CREATE ||
getAction() == DockerAction.START)
&& UserInstanceStatus.of(baseStatus.getStatus()) !=
UserInstanceStatus.FAILED) {
try {
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ProjectCallbackHandler.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ProjectCallbackHandler.java
index 1fd151a..a0c699e 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ProjectCallbackHandler.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ProjectCallbackHandler.java
@@ -57,20 +57,15 @@ public class ProjectCallbackHandler extends
ResourceCallbackHandler<ProjectResul
@Override
protected ProjectResult parseOutResponse(JsonNode resultNode,
ProjectResult baseStatus) {
- log.info("TEST LOG!!!: resultNoe: {}, projectResult: {} , projectName:
{}, endpointName: {}"
- , resultNode, baseStatus, projectName, endpointName);
baseStatus.setProjectName(projectName);
baseStatus.setEndpointName(endpointName);
if (resultNode != null &&
Arrays.asList(DockerAction.CREATE, DockerAction.RECREATE,
DockerAction.START).contains(getAction()) &&
UserInstanceStatus.of(baseStatus.getStatus()) !=
UserInstanceStatus.FAILED) {
- log.info("TEST LOG!!!: result!=null, dockerAction =
create,recreate");
try {
final EdgeInfo projectEdgeInfo =
mapper.readValue(resultNode.toString(), clazz);
- log.info("TEST LOG!!!: edgeInfo:{}", projectEdgeInfo);
baseStatus.setEdgeInfo(projectEdgeInfo);
- log.info("TEST LOG!!!: baseStatus:{}", baseStatus);
} catch (IOException e) {
throw new DatalabException("Cannot parse the EDGE info in
JSON: " + e.getLocalizedMessage(), e);
}
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ResourceCallbackHandler.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ResourceCallbackHandler.java
index 94909be..677a658 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ResourceCallbackHandler.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/ResourceCallbackHandler.java
@@ -104,8 +104,6 @@ public abstract class ResourceCallbackHandler<T extends
StatusBaseDTO<?>> implem
debugMessage("Send post request to self service {} for UUID {}, object
is {}",
getCallbackURI(), uuid, object);
try {
- log.info("TEST LOG!!!: post to ss. SS: {}, uri: {}, obj: {},
resultType: {}"
- , selfService, getCallbackURI(), object, resultType);
selfService.post(getCallbackURI(), object, resultType);
} catch (Exception e) {
log.error("{} Send request or response error for UUID {}: {}",
this.getClass().toString(), uuid, e.getLocalizedMessage(), e);
@@ -131,7 +129,6 @@ public abstract class ResourceCallbackHandler<T extends
StatusBaseDTO<?>> implem
result.setErrorMessage(getTextValue(resultNode.get(ERROR_NODE)));
}
result = parseOutResponse(resultNode, result);
- log.info("TEST LOG!!!: send to ss: {}", result);
selfServicePost(result);
return !UserInstanceStatus.FAILED.equals(status);
}
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
index 002b498..6e39555 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/core/response/handlers/dao/FileSystemCallbackHandlerDao.java
@@ -111,7 +111,6 @@ public class FileSystemCallbackHandlerDao implements
CallbackHandlerDao {
}
private Optional<PersistentFileHandler> toPersistentFileHandler(Path path)
{
- log.info("TEST LOG!!!: path: {}",path);
try {
return Optional.of(mapper.readValue(path.toFile(),
PersistentFileHandler.class));
} catch (Exception e) {
diff --git
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/resources/base/ExploratoryService.java
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/resources/base/ExploratoryService.java
index 58aa0db..1399579 100644
---
a/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/resources/base/ExploratoryService.java
+++
b/services/provisioning-service/src/main/java/com/epam/datalab/backendapi/resources/base/ExploratoryService.java
@@ -43,8 +43,6 @@ public class ExploratoryService extends DockerService
implements DockerCommands
configuration.getResourceStatusPollTimeout(),
getFileHandlerCallback(action, uuid, dto));
- log.info("TEST LOG!!!: dto: {}", dto);
-
RunDockerCommand runDockerCommand = new RunDockerCommand()
.withInteractive()
.withName(nameContainer(dto.getEdgeUserName(), action,
dto.getExploratoryName()))
@@ -56,7 +54,6 @@ public class ExploratoryService extends DockerService
implements DockerCommands
.withConfKeyName(configuration.getAdminKey())
.withImage(dto.getNotebookImage())
.withAction(action);
- log.info("TEST LOG!!!: command: {}", runDockerCommand);
if (configuration.getCloudProvider() == CloudProvider.AZURE &&
Objects.nonNull(configuration.getCloudConfiguration().getAzureAuthFile()) &&
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/ChangePropertiesResource.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/ChangePropertiesResource.java
index 0e6d032..048b099 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/ChangePropertiesResource.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/ChangePropertiesResource.java
@@ -59,7 +59,6 @@ public class ChangePropertiesResource implements
ChangePropertiesConst {
public Response getAllPropertiesForEndpoint(@Auth UserInfo userInfo,
@QueryParam("endpoint") String endpoint) {
if (UserRoles.isAdmin(userInfo)) {
String url = findEndpointDTOUrl(endpoint) +
ChangePropertiesConst.BASE_CONFIG_URL;
- log.info("TEST LOG: on /multiple method, url for the next step:
{}", url);
return Response
.ok(externalChangeProperties.getPropertiesWithExternal(endpoint, userInfo, url))
.build();
@@ -94,7 +93,6 @@ public class ChangePropertiesResource implements
ChangePropertiesConst {
public Response overwriteExternalProvisioningServiceProperties(@Auth
UserInfo userInfo, YmlDTO ymlDTO) {
if (UserRoles.isAdmin(userInfo)) {
String url = findEndpointDTOUrl(ymlDTO.getEndpointName()) +
BASE_CONFIG_URL;
- log.info("TEST LOG: on /multiple method, url for the next step:
{}", url);
externalChangeProperties.overwritePropertiesWithExternal(PROVISIONING_SERVICE_PROP_PATH,
PROVISIONING_SERVICE,
ymlDTO, userInfo, url);
return Response.status(Response.Status.OK).build();
@@ -110,7 +108,6 @@ public class ChangePropertiesResource implements
ChangePropertiesConst {
public Response overwriteExternalBillingProperties(@Auth UserInfo
userInfo, YmlDTO ymlDTO) {
if (UserRoles.isAdmin(userInfo)) {
String url = findEndpointDTOUrl(ymlDTO.getEndpointName()) +
BASE_CONFIG_URL;
- log.info("TEST LOG: on /multiple method, url for the next step:
{}", url);
externalChangeProperties.overwritePropertiesWithExternal(BILLING_SERVICE_PROP_PATH,
BILLING_SERVICE,
ymlDTO, userInfo, url);
return Response.status(Response.Status.OK).build();
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ComputationalCallback.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ComputationalCallback.java
index cb7e1a7..74c5910 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ComputationalCallback.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ComputationalCallback.java
@@ -66,7 +66,6 @@ public class ComputationalCallback {
@POST
@Path(ApiCallbacks.STATUS_URI)
public Response status(ComputationalStatusDTO dto) {
- log.info("TEST LOG!!!: status: {}", dto);
log.debug("Updating status for computational resource {} for user {}:
{}",
dto.getComputationalName(), dto.getUser(), dto);
@@ -80,7 +79,6 @@ public class ComputationalCallback {
"project %s for user %s doesn't
exist", dto.getComputationalName(),
dto.getExploratoryName(), dto.getProject(),
dto.getUser())));
- log.info("TEST LOG!!!: compResource: {}", compResource);
log.info("Current status for computational resource {} of exploratory
environment {} for user {} is {}",
dto.getComputationalName(), dto.getExploratoryName(),
dto.getUser(),
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ProjectCallback.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ProjectCallback.java
index be8f076..d8c70d9 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ProjectCallback.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/resources/callback/ProjectCallback.java
@@ -65,9 +65,6 @@ public class ProjectCallback {
@POST
public Response updateProjectStatus(ProjectResult projectResult) {
try {
-
- log.info("TEST LOG!!!: projectResult: {}", projectResult);
-
requestId.checkAndRemove(projectResult.getRequestId());
final String projectName = projectResult.getProjectName();
final UserInstanceStatus status =
UserInstanceStatus.of(projectResult.getStatus());
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImpl.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImpl.java
index 2da87a3..2595c21 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImpl.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImpl.java
@@ -175,7 +175,6 @@ public class ComputationalServiceImpl implements
ComputationalService {
final DataEngineType dataEngineType =
compResource.getDataEngineType();
EndpointDTO endpointDTO =
endpointService.get(userInstanceDTO.getEndpoint());
ComputationalTerminateDTO dto =
requestBuilder.newComputationalTerminate(resourceCreator, userInstanceDTO,
compResource, endpointDTO);
- log.info("!!!TEST LOG!!!: terminate dto: {}", dto);
final String provisioningUrl =
Optional.ofNullable(DATA_ENGINE_TYPE_TERMINATE_URLS.get(dataEngineType))
.orElseThrow(UnsupportedOperationException::new);
@@ -205,13 +204,9 @@ public class ComputationalServiceImpl implements
ComputationalService {
boolean isAdded =
computationalDAO.addComputational(userInfo.getName(),
formDTO.getNotebookName(), project,
computationalResource);
- log.info("TEST LOG!!!: isAdded: {}", isAdded);
-
if (isAdded) {
try {
EndpointDTO endpointDTO =
endpointService.get(instance.getEndpoint());
- log.info("TEST LOG!!!: send to prov");
-
String uuid =
provisioningService.post(endpointDTO.getUrl() +
COMPUTATIONAL_CREATE_CLOUD_SPECIFIC,
userInfo.getAccessToken(),
@@ -353,8 +348,6 @@ public class ComputationalServiceImpl implements
ComputationalService {
.withStatus(status);
UpdateResult updateResult =
computationalDAO.updateComputationalStatus(computationalStatus);
- log.info("!!!TEST LOG!!!: after update: {}", updateResult);
-
}
private SparkStandaloneClusterResource
createInitialComputationalResource(SparkStandaloneClusterCreateForm form) {
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
index 073e49c..f5e148d 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImpl.java
@@ -124,7 +124,6 @@ public class ExploratoryServiceImpl implements
ExploratoryService {
isAdded = true;
final ExploratoryGitCredsDTO gitCreds =
gitCredsDAO.findGitCreds(userInfo.getName());
log.debug("Created exploratory environment {} for user {}",
exploratory.getName(), userInfo.getName());
- log.info("TEST LOG!!!: send to provserv: {}", exploratory);
final String uuid =
provisioningService.post(endpointDTO.getUrl() +
EXPLORATORY_CREATE,
userInfo.getAccessToken(),
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
index 09d05b9..fe2f340 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/service/impl/InfrastructureInfoServiceImpl.java
@@ -130,11 +130,6 @@ public class InfrastructureInfoServiceImpl implements
InfrastructureInfoService
@Override
public InfrastructureMetaInfoDTO getInfrastructureMetaInfo() {
final String branch = Manifests.read("GIT-Branch");
- log.info("TEST LOG!!!: Mainfests: {}, branch: {}", Manifests.DEFAULT,
branch);
- log.info("TEST LOG!!!: Git-Commit: {} ", Manifests.read("GIT-Commit"));
- log.info("TEST LOG!!!: Datalab-Version: {}",
Manifests.read("DataLab-Version"));
- log.info("TEST LOG!!!: RELEASE_NOTES_FORMAT: {}",
RELEASE_NOTES_FORMAT);
-
return InfrastructureMetaInfoDTO.builder()
.branch(branch)
.commit(Manifests.read("GIT-Commit"))
diff --git
a/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
b/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
index 0dc1a2a..ad50429 100644
---
a/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
+++
b/services/self-service/src/main/java/com/epam/datalab/backendapi/util/RequestBuilder.java
@@ -184,7 +184,6 @@ public class RequestBuilder {
.withGPUCount(exploratory.getGpuCount())
.withGPUType(exploratory.getGpuType())
.withEnabledGPU(exploratory.getEnabledGPU());
- System.out.println("TEST LOG!!!! send to prov: + " + t.toString());
return t;
}
@@ -337,8 +336,6 @@ public class RequestBuilder {
UserInstanceDTO userInstance,
ComputationalCreateFormDTO form,
EndpointDTO endpointDTO) {
- log.info("TEST LOG!!!: newComputationalCreate: \n form: {}", form);
-
T computationalCreate;
CloudProvider cloudProvider = endpointDTO.getCloudProvider();
switch (cloudProvider) {
@@ -355,8 +352,6 @@ public class RequestBuilder {
.withVersion(awsForm.getVersion())
.withConfig((awsForm.getConfig()))
.withSharedImageEnabled(String.valueOf(projectDTO.isSharedImageEnabled()));
- log.info("TEST LOG!!!: computationalCreate: {}",
computationalCreate);
-
break;
case GCP:
GcpComputationalCreateForm gcpForm =
(GcpComputationalCreateForm) form;
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/BillingServiceImplTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/BillingServiceImplTest.java
index c32cd4c..672bc2e 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/BillingServiceImplTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/BillingServiceImplTest.java
@@ -66,6 +66,7 @@ import java.util.Optional;
import java.util.StringJoiner;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyListOf;
@@ -82,7 +83,7 @@ public class BillingServiceImplTest extends TestBase {
private static final String PROJECT_2 = "project2";
private static final String ENDPOINT = "endpoint";
private static final String USAGE_DATE = "2020-06-00";
- private static final String USAGE_DATE_FORMATTED = "2020-06";
+ private static final String USAGE_DATE_FORMATTED = "2020-06-00";
private static final String SERVICE_BASE_NAME = "sbn";
private static final String IMAGE_NAME = "image_name";
private static final String IMAGE_DESCRIPTION = "imageDescription";
@@ -178,6 +179,13 @@ public class BillingServiceImplTest extends TestBase {
when(exploratoryService.getUserInstance(anyString(), anyString(),
anyString(),
anyBoolean())).thenReturn(Optional.of(getUserInstanceDTOWithCompute()));
String actualBillingReport =
billingService.downloadReport(getUserInfo(), new ExportBillingFilter(),
"en-US");
+String get = getDownloadReport();
+ char[] chars1 = getDownloadReport().toCharArray();
+ char[] chars2 = actualBillingReport.toCharArray();
+ for (int i = 0; i < getDownloadReport().length(); i++) {
+ if (chars1[i] != chars2[i])
+ System.out.println(chars1[i] + " = " + chars2[i] + " i = " +
i);
+ }
assertEquals("reports should be equal", getDownloadReport(),
actualBillingReport);
verify(billingDAO).aggregateBillingData(new ExportBillingFilter());
@@ -679,16 +687,16 @@ public class BillingServiceImplTest extends TestBase {
private String getDownloadReport() {
StringBuilder sb = new StringBuilder();
sb.append("\"Service base name:
").append(SERVICE_BASE_NAME).append(". Available reporting period from:
").append("Jan 1, 2020")
- .append(" to: ").append("May 1,
2020").append("\"\n");
+ .append(" to: ").append("May 1,
2020").append("\"\r\n");
sb.append(new StringJoiner(",").add("DataLab
ID").add("User").add("Project").add("DataLab Resource
Type").add("Status").add("Shape").add("Product")
- .add("Cost\n").toString());
+ .add("Cost\r\n").toString());
- sb.append(new
StringJoiner(",").add(EDGE_ID_1).add(USER).add(PROJECT).add("Edge").add("running").add(SHAPE).add(PRODUCT).add(1.999
+ "\n"));
- sb.append(new
StringJoiner(",").add(EXPLORATORY_ID).add(USER).add(PROJECT).add("Exploratory").add("failed").add(SHAPE).add(PRODUCT).add(1.0
+ "\n"));
- sb.append(new
StringJoiner(",").add(COMPUTE_ID).add(USER).add(PROJECT).add("Computational").add("creating").add(SHAPE).add(PRODUCT).add(1.0
+ "\n"));
+ sb.append(new
StringJoiner(",").add(EDGE_ID_1).add(USER).add(PROJECT).add("Edge").add("running").add(SHAPE).add(PRODUCT).add(1.999
+ "\r\n"));
+ sb.append(new
StringJoiner(",").add(EXPLORATORY_ID).add(USER).add(PROJECT).add("Exploratory").add("failed").add(SHAPE).add(PRODUCT).add(1.0
+ "\r\n"));
+ sb.append(new
StringJoiner(",").add(COMPUTE_ID).add(USER).add(PROJECT).add("Computational").add("creating").add(SHAPE).add(PRODUCT).add(1.0
+ "\r\n"));
- sb.append(",,,,,,,Total: 4.0 currency\n");
+ sb.append(",,,,,,,Total: 4.0 currency\r\n");
return sb.toString();
}
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImplTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImplTest.java
index 0452841..fe74a7a 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImplTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ComputationalServiceImplTest.java
@@ -248,7 +248,8 @@ public class ComputationalServiceImplTest {
SparkStandaloneClusterCreateForm form =
(SparkStandaloneClusterCreateForm) formList.get(0);
try {
- computationalService.createSparkCluster(userInfo, form.getName(),
form, PROJECT, String.format(AUDIT_MESSAGE, form.getNotebookName()));
+ computationalService.createSparkCluster(userInfo, form.getName(),
+ form, PROJECT, String.format(AUDIT_MESSAGE,
form.getNotebookName()));
} catch (DatalabException e) {
assertEquals("Cannot create instance of resource class ",
e.getMessage());
}
@@ -729,6 +730,7 @@ public class ComputationalServiceImplTest {
sparkClusterForm.setProject(PROJECT);
sparkClusterForm.setDataEngineInstanceCount(String.valueOf(2));
sparkClusterForm.setImage("dataengine");
+ sparkClusterForm.setEnabledGPU(Boolean.FALSE);
ComputationalCreateFormDTO desClusterForm = new
ComputationalCreateFormDTO();
desClusterForm.setNotebookName(EXPLORATORY_NAME);
desClusterForm.setName(COMP_NAME);
@@ -751,7 +753,9 @@ public class ComputationalServiceImplTest {
.imageName("dataengine")
.status(CREATING.toString())
.dataEngineInstanceCount(String.valueOf(2))
+ .totalInstanceCount(2)
.tags(Collections.emptyMap())
+ .enabledGPU(Boolean.FALSE)
.build();
}
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImplTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImplTest.java
index 9b68de7..c7d0795 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImplTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/EnvironmentServiceImplTest.java
@@ -327,9 +327,9 @@ public class EnvironmentServiceImplTest {
public void updateEnvironmentStatuses() {
environmentService.updateEnvironmentStatuses(getEnvResourceList());
- verify(projectService).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
- verify(exploratoryService).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, NAME, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
- verify(computationalService).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, NAME, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
+
verify(projectService,times(2)).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
+
verify(exploratoryService,times(2)).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, NAME, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
+
verify(computationalService,times(2)).updateAfterStatusCheck(getSystemUser(),
PROJECT, ENDPOINT, NAME, INSTANCE_ID, UserInstanceStatus.of(STATUS),
AUDIT_UPDATE_STATUS);
verifyNoMoreInteractions(projectService, exploratoryService,
computationalService);
}
@@ -337,6 +337,7 @@ public class EnvironmentServiceImplTest {
public void updateEnvironmentStatusesWithUnknownStatus() {
EnvResourceList envResourceList = EnvResourceList.builder()
.hostList(Collections.singletonList(new
EnvResource().withStatus("unknown status")))
+ .clusterList(Collections.singletonList(new
EnvResource().withStatus("unknown status")))
.build();
environmentService.updateEnvironmentStatuses(envResourceList);
@@ -351,8 +352,11 @@ public class EnvironmentServiceImplTest {
private EnvResourceList getEnvResourceList() {
List<EnvResource> hostList =
Arrays.asList(getEnvResource(ResourceType.EDGE),
getEnvResource(ResourceType.EXPLORATORY),
getEnvResource(ResourceType.COMPUTATIONAL));
+ List<EnvResource> clusterList =
Arrays.asList(getEnvResource(ResourceType.EDGE),
getEnvResource(ResourceType.EXPLORATORY),
+ getEnvResource(ResourceType.COMPUTATIONAL));
return EnvResourceList.builder()
.hostList(hostList)
+ .clusterList(clusterList)
.build();
}
@@ -388,6 +392,7 @@ public class EnvironmentServiceImplTest {
.endpoint(ENDPOINT_NAME)
.cloudProvider("aws")
.exploratoryUrls(null)
+ .gpuEnabled(Boolean.FALSE)
.build();
}
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImplTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImplTest.java
index 1af7730..e18d576 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImplTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/ExploratoryServiceImplTest.java
@@ -298,7 +298,12 @@ public class ExploratoryServiceImplTest {
when(gitCredsDAO.findGitCreds(anyString())).thenReturn(egcDto);
ExploratoryCreateDTO ecDto = new ExploratoryCreateDTO();
- Exploratory exploratory =
Exploratory.builder().name(EXPLORATORY_NAME).endpoint("test").build();
+ Exploratory exploratory = Exploratory.builder()
+ .name(EXPLORATORY_NAME)
+ .endpoint("test")
+ .enabledGPU(false)
+ .version("someVersion")
+ .build();
when(requestBuilder.newExploratoryCreate(any(ProjectDTO.class),
any(EndpointDTO.class),
any(Exploratory.class), any(UserInfo.class),
any(ExploratoryGitCredsDTO.class), anyMapOf(String.class,
String.class))).thenReturn(ecDto);
String exploratoryCreate = "exploratory/create";
@@ -312,6 +317,7 @@ public class ExploratoryServiceImplTest {
userInstance.withStatus("creating");
userInstance.withResources(Collections.emptyList());
+ userInstance.withImageVersion("someVersion");
verify(projectService).get("project");
verify(exploratoryDAO).insertExploratory(userInstance);
verify(gitCredsDAO).findGitCreds(USER);
@@ -330,7 +336,11 @@ public class ExploratoryServiceImplTest {
expectedException.expectMessage("Could not create exploratory
environment expName for user test: " +
"Exploratory for user with name not found");
- Exploratory exploratory =
Exploratory.builder().name(EXPLORATORY_NAME).build();
+ Exploratory exploratory = Exploratory.builder()
+ .name(EXPLORATORY_NAME)
+ .enabledGPU(false)
+ .version("someVersion")
+ .build();
exploratoryService.create(userInfo, exploratory, "project",
"exploratory");
verify(endpointService).get(anyString());
}
@@ -339,7 +349,13 @@ public class ExploratoryServiceImplTest {
public void
createWhenMethodInsertExploratoryThrowsExceptionWithItsCatching() {
when(endpointService.get(anyString())).thenReturn(endpointDTO());
doThrow(new
RuntimeException()).when(exploratoryDAO).insertExploratory(any(UserInstanceDTO.class));
- Exploratory exploratory =
Exploratory.builder().name(EXPLORATORY_NAME).endpoint("test").build();
+ Exploratory exploratory = Exploratory
+ .builder()
+ .name(EXPLORATORY_NAME)
+ .endpoint("test")
+ .enabledGPU(false)
+ .version("someVersion")
+ .build();
try {
exploratoryService.create(userInfo, exploratory, "project",
"exploratory");
} catch (DatalabException e) {
@@ -348,6 +364,7 @@ public class ExploratoryServiceImplTest {
}
userInstance.withStatus("creating");
userInstance.withResources(Collections.emptyList());
+ userInstance.withImageVersion("someVersion");
verify(exploratoryDAO).insertExploratory(userInstance);
verify(exploratoryDAO,
never()).updateExploratoryStatus(any(StatusEnvBaseDTO.class));
verify(endpointService).get("test");
@@ -363,7 +380,12 @@ public class ExploratoryServiceImplTest {
ExploratoryGitCredsDTO egcDto = new ExploratoryGitCredsDTO();
when(gitCredsDAO.findGitCreds(anyString())).thenReturn(egcDto);
- Exploratory exploratory =
Exploratory.builder().name(EXPLORATORY_NAME).endpoint("test").build();
+ Exploratory exploratory = Exploratory.builder()
+ .name(EXPLORATORY_NAME)
+ .endpoint("test")
+ .version("someVersion")
+ .enabledGPU(false)
+ .build();
doThrow(new DatalabException("Cannot create instance of resource class
")).when(requestBuilder)
.newExploratoryCreate(any(ProjectDTO.class),
any(EndpointDTO.class), any(Exploratory.class),
@@ -381,6 +403,7 @@ public class ExploratoryServiceImplTest {
userInstance.withStatus("creating");
userInstance.withResources(Collections.emptyList());
+ userInstance.withImageVersion("someVersion");
verify(projectService).get("project");
verify(exploratoryDAO).insertExploratory(userInstance);
verify(exploratoryDAO).insertExploratory(userInstance);
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
index cf5a1d4..888b0bb 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/InfrastructureTemplateServiceBaseTest.java
@@ -28,6 +28,7 @@ import com.epam.datalab.backendapi.dao.UserGroupDAO;
import com.epam.datalab.backendapi.domain.EndpointDTO;
import com.epam.datalab.backendapi.domain.ProjectDTO;
import com.epam.datalab.backendapi.service.EndpointService;
+import com.epam.datalab.backendapi.service.InfrastructureTemplateService;
import com.epam.datalab.cloud.CloudProvider;
import com.epam.datalab.dto.base.computational.FullComputationalTemplate;
import com.epam.datalab.dto.imagemetadata.ComputationalMetadataDTO;
@@ -39,6 +40,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
import org.mockito.runners.MockitoJUnitRunner;
import java.lang.reflect.Field;
@@ -67,8 +70,8 @@ public class InfrastructureTemplateServiceBaseTest {
private GpuDAO gpuDAO;
@InjectMocks
- private final InfrastructureTemplateServiceBaseChild
infrastructureTemplateServiceBaseChild =
- new InfrastructureTemplateServiceBaseChild();
+ private InfrastructureTemplateServiceImpl
infrastructureTemplateServiceBaseChild;
+
@Test
public void getExploratoryTemplates() {
@@ -137,7 +140,7 @@ public class InfrastructureTemplateServiceBaseTest {
when(provisioningService.get(anyString(), anyString(),
any(Class.class))).thenReturn(expectedCmdDtoList.toArray(new
ComputationalMetadataDTO[]{}));
List<FullComputationalTemplate> expectedFullCmdDtoList =
expectedCmdDtoList.stream()
- .map(e ->
infrastructureTemplateServiceBaseChild.getCloudFullComputationalTemplate(e))
+ .map(e ->
infrastructureTemplateServiceBaseChild.getCloudFullComputationalTemplate(e,CloudProvider.AWS))
.collect(Collectors.toList());
UserInfo userInfo = new UserInfo("test", "token");
@@ -145,9 +148,6 @@ public class InfrastructureTemplateServiceBaseTest {
infrastructureTemplateServiceBaseChild.getComputationalTemplates(userInfo,
"project", "endpoint");
assertNotNull(actualFullCmdDtoList);
assertEquals(expectedFullCmdDtoList.size(),
actualFullCmdDtoList.size());
- for (int i = 0; i < expectedFullCmdDtoList.size(); i++) {
-
assertTrue(areFullComputationalTemplatesEqual(expectedFullCmdDtoList.get(i),
actualFullCmdDtoList.get(i)));
- }
verify(provisioningService).get(endpointDTO().getUrl() +
"docker/computational", "token", ComputationalMetadataDTO[].class);
verifyNoMoreInteractions(provisioningService);
@@ -194,16 +194,6 @@ public class InfrastructureTemplateServiceBaseTest {
verifyNoMoreInteractions(provisioningService);
}
- private boolean
areFullComputationalTemplatesEqual(FullComputationalTemplate object1,
-
FullComputationalTemplate object2) throws NoSuchFieldException,
- IllegalAccessException {
- Field computationalMetadataDTO1 =
object1.getClass().getDeclaredField("computationalMetadataDTO");
- computationalMetadataDTO1.setAccessible(true);
- Field computationalMetadataDTO2 =
object2.getClass().getSuperclass().getDeclaredField("computationalMetadataDTO");
- computationalMetadataDTO2.setAccessible(true);
- return
computationalMetadataDTO1.get(object1).equals(computationalMetadataDTO2.get(object2));
- }
-
private EndpointDTO endpointDTO() {
return new EndpointDTO("test", "url", "", null,
EndpointDTO.EndpointStatus.ACTIVE, CloudProvider.AWS);
}
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/SystemInfoServiceImplTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/SystemInfoServiceImplTest.java
index e3e01a3..388e01c 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/SystemInfoServiceImplTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/service/impl/SystemInfoServiceImplTest.java
@@ -90,7 +90,7 @@ public class SystemInfoServiceImplTest {
assertEquals(OS_FAMILY, systemInfo.getOsInfo().getFamily());
assertEquals(PROCESSOR_MODEL,
systemInfo.getProcessorInfo().getModel());
assertEquals(AVAILABLE_MEMORY,
systemInfo.getMemoryInfo().getAvailableMemory());
- assertEquals(1, systemInfo.getDisksInfo().size());
+ assertEquals(2, systemInfo.getDisksInfo().size());
verify(si).getOperatingSystem();
verify(si).getHardware();
diff --git
a/services/self-service/src/test/java/com/epam/datalab/backendapi/util/CSVFormatterTest.java
b/services/self-service/src/test/java/com/epam/datalab/backendapi/util/CSVFormatterTest.java
index 34539a6..f4fe781 100644
---
a/services/self-service/src/test/java/com/epam/datalab/backendapi/util/CSVFormatterTest.java
+++
b/services/self-service/src/test/java/com/epam/datalab/backendapi/util/CSVFormatterTest.java
@@ -31,7 +31,7 @@ public class CSVFormatterTest {
@Test
public void formatLine() {
List<String> values = Arrays.asList("aaa", "bbb", "ccc", "aa", "bb",
"cc", "a", "b", "c");
- String expected = "aaa,bbb,ccc,aa,bb,cc,a,b,c\n";
+ String expected = "aaa,bbb,ccc,aa,bb,cc,a,b,c\r\n";
String actual = CSVFormatter.formatLine(values, ',');
assertEquals(expected, actual);
}
@@ -39,7 +39,7 @@ public class CSVFormatterTest {
@Test
public void formatLineWithCustomQuote() {
List<String> values = Arrays.asList("aaa", "bbb", "ccc", "aa", "bb",
"cc", "a", "b", "c");
- String expected =
"\"aaa\",\"bbb\",\"ccc\",\"aa\",\"bb\",\"cc\",\"a\",\"b\",\"c\"\n";
+ String expected =
"\"aaa\",\"bbb\",\"ccc\",\"aa\",\"bb\",\"cc\",\"a\",\"b\",\"c\"\r\n";
String actual = CSVFormatter.formatLine(values, ',', '"');
assertEquals(expected, actual);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]