hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEProtocolsTest.cpp
Go to the documentation of this file.
1 #include <gtest/gtest.h>
2 #include <fstream>
3 #include <utility>
4 
5 #include "DRCEError.hpp"
6 #include "DRCESessionOptions.hpp"
7 #include "DRCEResourceLimits.hpp"
11 #include "DRCEFunctionalObject.hpp"
13 #include "DRCEResultData.hpp"
15 
16 #include "DRCEProtocolsTest.hpp"
17 #include "DRCEPrintStatus.hpp"
18 
19 namespace HCE
20 {
21 namespace drce
22 {
23 namespace tests
24 {
25 //-----------------------------------------------------------------------------
27 {
28  const size_t SZ = 3;
29  FileItem files[SZ] = {{"file1", "data1", 2},{"file2", "data2", 4},{"file3", "data3", 8}};
30 
31 
32  DRCEResultData resultData;
33  DRCEResultDataItem resultDataItem;
34  resultDataItem.setStderrStream("none");
35  resultDataItem.setStdoutStream("Test message");
36  for (size_t i=0;i<SZ;++i)
37  resultDataItem.addFileItem(files[i].name, files[i].data, files[i].actionType);
38 
39  resultData.addDataItem(std::forward<DRCEResultDataItem>(resultDataItem));
40  DRCEResultDataSerializator resultSerializator(resultData);
41 
42  std::string json;
43  bool ret = resultSerializator.serialize(json);
44  ASSERT_TRUE(ret) << printError(resultSerializator);
45 
46 // std::cout << "json: " << json << std::endl;
47 
48  resultData.clear();
49  size_t itemsCount = resultData.getItemsCount();
50  for (size_t i=0;i<itemsCount;++i)
51  {
52  ASSERT_TRUE(resultData.getDataItem(i).getStderrStream().empty());
53  ASSERT_TRUE(resultData.getDataItem(i).getStdoutStream().empty());
54  ASSERT_EQ(resultData.getDataItem(i).getFilesCount(), 0);
55  }
56 
57  ret = resultSerializator.unserialize(json);
58  ASSERT_TRUE(ret) << printError(resultSerializator);
59 
60  itemsCount = resultData.getItemsCount();
61  ASSERT_EQ(itemsCount, 1);
62  ASSERT_EQ(resultData.getDataItem(0).getStderrStream(), "none");
63  ASSERT_EQ(resultData.getDataItem(0).getStdoutStream(), "Test message");
64  const size_t filesCount = resultData.getDataItem(0).getFilesCount();
65  ASSERT_EQ(filesCount, SZ);
66 
67  for (size_t i=0;i<SZ;++i)
68  {
69  ASSERT_EQ(resultData.getDataItem(0).getFileItem(i).name, files[i].name);
70  ASSERT_EQ(resultData.getDataItem(0).getFileItem(i).data, files[i].data);
71  ASSERT_EQ(resultData.getDataItem(0).getFileItem(i).actionType, files[i].actionType);
72  }
73  printSuccess("Test ResultDataSerializator");
74 }
75 //-----------------------------------------------------------------------------
77 {
78  std::stringstream sourceJson, restoreJson;
79 
80  DRCETaskRequestSetExecute taskRequestSetExecute;
82  sessionOptions.sessionType = SessionOptions::SessionType::stSsh;
83  sessionOptions.userName = "user1";
84  sessionOptions.userPassword = "pass1";
85  sessionOptions.shellName = "Shell";
86  sessionOptions.homeDir = ".";
87  sessionOptions.port = 22;
88  sessionOptions.timeout = 43;
89  sessionOptions.tmode = (SessionOptions::ThreadMode)5;
90  sessionOptions.environments.push_back(std::make_pair("PATH", "../"));
91  sessionOptions.environments.push_back(std::make_pair("LD_PATH", "./"));
92 
93  taskRequestSetExecute.setSessionOptions(std::forward<SessionOptions>(sessionOptions));
94  taskRequestSetExecute.setCommandLine("cmd");
95  taskRequestSetExecute.setInputStream("Stream");
96  taskRequestSetExecute.addFileItem("file1", "data1", FileItem::DELETE_BEFORE_EXEC);
97  taskRequestSetExecute.addFileItem("file2", "data2", FileItem::READ_AFTER_EXEC_AND_RETURN_RESULT);
98 
99  DRCEInputJsonMessage sourceMessage, restoreMessage;
100 /*
101  sourceJson << taskRequestSetExecute;
102  sourceMessage.setRequestType(DRCETaskRequest::RequestType::rtSetTaskExecute);
103  sourceMessage.setRequestData(sourceJson.str());
104 */
105  sourceMessage.setTaskRequest(new DRCETaskRequestSetExecute(taskRequestSetExecute));
106  sourceMessage.setRequestId(789);
107 
108  sourceJson.str("");
109  sourceJson << sourceMessage;
110 
111 // sourceJson.str("{\"type\":0,\"data\":\"{\\\"session\\\":{\\\"type\\\":0,\\\"port\\\":0,\\\"user\\\":\\\"\\\",\\\"password\\\":\\\"\\\",\\\"shell\\\":\\\"\\\",\\\"environment\\\":[],\\\"home_dir\\\":\\\"\\\",\\\"timeout\\\":0,\\\"tmode\\\":1,\\\"time_max\\\":60000},\\\"command\\\":\\\"ls -la\\\",\\\"input\\\":\\\"\\\",\\\"files\\\":[],\\\"limits\\\":{\\\"proc_max\\\":0,\\\"threads_max\\\":0,\\\"cpu\\\":0,\\\"vram_free\\\":0,\\\"vram_free_min\\\":0,\\\"rram_free\\\":0,\\\"rram_free_min\\\":0,\\\"disk_free\\\":0,\\\"disk_free_min\\\":0}}\",\"id\":12345}");
112 
113  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
114  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
115  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
116  printSuccess("DRCEInputJsonMessage serialize");
117 
118  sourceJson >> restoreMessage; // unserialize
119 
120  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
121  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
122  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
123  printSuccess("DRCEInputJsonMessage unserialize");
124 
125  restoreJson << restoreMessage; // serialize
126  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
127 // std::cout << "json: " << sourceJson.str() << std::endl;
128 // std::cout << "json: " << restoreJson.str() << std::endl;
129 
130  ASSERT_EQ(sourceMessage.getRequestType(), restoreMessage.getRequestType());
131  ASSERT_EQ(sourceMessage.getRequestData(), restoreMessage.getRequestData());
132  ASSERT_EQ(sourceMessage.getRequestId(), restoreMessage.getRequestId());
133  ASSERT_EQ(sourceJson.str(), restoreJson.str());
134  printSuccess("Test InputJsonMessage");
135 }
136 //-----------------------------------------------------------------------------
138 {
139  std::stringstream sourceJson, restoreJson;
140  DRCETaskRequestSetExecute sourceMessage, restoreMessage;
141 
143  sessionOptions.sessionType = SessionOptions::SessionType::stSsh;
144  sessionOptions.userName = "user1";
145  sessionOptions.userPassword = "pass1";
146  sessionOptions.shellName = "Shell";
147  sessionOptions.homeDir = ".";
148  sessionOptions.port = 22;
149  sessionOptions.timeout = 43;
150  sessionOptions.tmode = (SessionOptions::ThreadMode)5;
151  sessionOptions.environments.push_back(std::make_pair("PATH", "../"));
152  sessionOptions.environments.push_back(std::make_pair("LD_PATH", "./"));
153 
154  sourceMessage.setSessionOptions(std::forward<SessionOptions>(sessionOptions));
155  sourceMessage.setCommandLine("cmd");
156  sourceMessage.setInputStream("Stream");
157  sourceMessage.addFileItem("file1", "data1", FileItem::DELETE_BEFORE_EXEC);
158  sourceMessage.addFileItem("file2", "data2", FileItem::READ_AFTER_EXEC_AND_RETURN_RESULT);
159 
160  sourceJson << sourceMessage;
161 
162  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
163  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
164  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
165  printSuccess("DRCETaskRequestSetExecute serialize");
166 
167  sourceJson >> restoreMessage; // unserialize
168 
169  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
170  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
171  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
172  printSuccess("DRCETaskRequestSetExecute unserialize");
173 
174  restoreJson << restoreMessage; // serialize
175  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
176 // std::cout << "json: " << sourceJson.str() << std::endl;
177 // std::cout << "json: " << restoreJson.str() << std::endl;
178 
179  ASSERT_EQ(sourceMessage.getSessionOptions().sessionType, restoreMessage.getSessionOptions().sessionType);
180  ASSERT_EQ(sourceMessage.getSessionOptions().port, restoreMessage.getSessionOptions().port);
181  ASSERT_EQ(sourceMessage.getSessionOptions().userName, restoreMessage.getSessionOptions().userName);
182  ASSERT_EQ(sourceMessage.getSessionOptions().userPassword, restoreMessage.getSessionOptions().userPassword);
183  ASSERT_EQ(sourceMessage.getSessionOptions().shellName, restoreMessage.getSessionOptions().shellName);
184  ASSERT_EQ(sourceMessage.getSessionOptions().homeDir, restoreMessage.getSessionOptions().homeDir);
185  ASSERT_EQ(sourceMessage.getSessionOptions().timeout, restoreMessage.getSessionOptions().timeout);
186  ASSERT_EQ(sourceMessage.getSessionOptions().tmode, restoreMessage.getSessionOptions().tmode);
187  ASSERT_EQ(sourceMessage.getSessionOptions().environments.size(), restoreMessage.getSessionOptions().environments.size());
188 
189  ASSERT_EQ(sourceMessage.getCommandLine(), restoreMessage.getCommandLine());
190  ASSERT_EQ(sourceMessage.getInputStream(), restoreMessage.getInputStream());
191  ASSERT_EQ(sourceMessage.getFilesCount(), restoreMessage.getFilesCount());
192  const size_t filesCount = sourceMessage.getFilesCount();
193  for (size_t i=0;i<filesCount;++i)
194  {
195  ASSERT_EQ(sourceMessage.getFileItem(i).name, restoreMessage.getFileItem(i).name);
196  ASSERT_EQ(sourceMessage.getFileItem(i).data, restoreMessage.getFileItem(i).data);
197  ASSERT_EQ(sourceMessage.getFileItem(i).actionType, restoreMessage.getFileItem(i).actionType);
198  }
199  ASSERT_EQ(sourceJson.str(), restoreJson.str());
200  printSuccess("Test DRCETaskRequestSetExecute");
201 }
202 //-----------------------------------------------------------------------------
204 {
205  std::stringstream sourceJson, restoreJson;
206  DRCEOutputJsonMessage sourceMessage, restoreMessage;
207 
208  DRCEResultData resultData;
209  DRCEResultDataItem resultDataItem;
210  resultDataItem.setErrorCode(ERROR_FUNCTIONAL_OBJECT);
211  resultDataItem.setErrorMessage("Error message");
212  resultDataItem.setTime(43);
213  resultDataItem.setRequestId(12345);
214  resultDataItem.setRequestType(DRCETaskRequest::RequestType::rtTerminateTask);
215  resultDataItem.setNodeHost("node_host");
216  resultDataItem.setNodePort("node_port");
217  resultDataItem.setState(45);
218  resultDataItem.setPid(10101);
219  resultDataItem.setStdoutStream("stdout stream");
220  resultDataItem.setStderrStream("stderr stream");
221  resultDataItem.addFileItem("file1", "data1", FileItem::DELETE_BEFORE_EXEC);
222  resultDataItem.addFileItem("file2", "data2", FileItem::READ_AFTER_EXEC_AND_RETURN_RESULT);
223  resultData.addDataItem(std::forward<DRCEResultDataItem>(resultDataItem));
224  sourceMessage.setResultData(resultData);
225 
226  std::string json;
227  bool ret = sourceMessage.serialize(json);
228  ASSERT_TRUE(ret) << printError(sourceMessage);
229  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
230  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
231  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
232  printSuccess("DRCEOutputJsonMessage serialize");
233 
234  sourceJson.str(json);
235  sourceJson >> restoreMessage; // unserialize
236 
237  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
238  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
239  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
240  printSuccess("DRCEOutputJsonMessage unserialize");
241 
242  restoreJson << restoreMessage; // serialize
243  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
244 
245 // std::cout << "json: " << sourceJson.str() << std::endl;
246 // std::cout << "json: " << restoreJson.str() << std::endl;
247 
248  ASSERT_EQ(sourceMessage.getResultData().getItemsCount(), 1);
249  ASSERT_EQ(sourceMessage.getResultData().getItemsCount(), restoreMessage.getResultData().getItemsCount());
250  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getErrorCode(), restoreMessage.getResultData().getDataItem(0).getErrorCode());
251  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getErrorMessage(), restoreMessage.getResultData().getDataItem(0).getErrorMessage());
252  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getTime(), restoreMessage.getResultData().getDataItem(0).getTime());
253  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getRequestId(), restoreMessage.getResultData().getDataItem(0).getRequestId());
254  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getRequestType(), restoreMessage.getResultData().getDataItem(0).getRequestType());
255  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getNodeHost(), restoreMessage.getResultData().getDataItem(0).getNodeHost());
256  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getNodePort(), restoreMessage.getResultData().getDataItem(0).getNodePort());
257  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getState(), restoreMessage.getResultData().getDataItem(0).getState());
258  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getStdoutStream(), restoreMessage.getResultData().getDataItem(0).getStdoutStream());
259  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getStderrStream(), restoreMessage.getResultData().getDataItem(0).getStderrStream());
260 
261  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFilesCount(), 2);
262  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFilesCount(), restoreMessage.getResultData().getDataItem(0).getFilesCount());
263  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(0).name, restoreMessage.getResultData().getDataItem(0).getFileItem(0).name);
264  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(0).data, restoreMessage.getResultData().getDataItem(0).getFileItem(0).data);
265  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(0).actionType, restoreMessage.getResultData().getDataItem(0).getFileItem(0).actionType);
266  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(1).name, restoreMessage.getResultData().getDataItem(0).getFileItem(1).name);
267  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(1).data, restoreMessage.getResultData().getDataItem(0).getFileItem(1).data);
268  ASSERT_EQ(sourceMessage.getResultData().getDataItem(0).getFileItem(1).actionType, restoreMessage.getResultData().getDataItem(0).getFileItem(1).actionType);
269 
270  ASSERT_EQ(sourceJson.str(), restoreJson.str());
271  printSuccess("Test OutputJsonMessage");
272 }
273 //-----------------------------------------------------------------------------
275 {
276  DRCETaskRequestSetExecute sourceMessage, restoreMessage;
277 
278  std::stringstream sourceJson;
279  SessionOptions sourceOptions, restoreOptions;
280  sourceOptions.sessionType = SessionOptions::SessionType::stSsh;
281  sourceOptions.port = 22;
282  sourceOptions.userName = "user";
283  sourceOptions.userPassword = "123";
284  sourceOptions.shellName = "Shell";
285  sourceOptions.homeDir = ".";
286  sourceOptions.timeout = 43;
287  sourceOptions.tmode = (SessionOptions::ThreadMode)5;
288  sourceOptions.timeMax = 500;
289  sourceOptions.environments.push_back(std::make_pair("PATH", "./"));
290  sourceOptions.environments.push_back(std::make_pair("LD_PATH", "../"));
291 
292  sourceMessage.setSessionOptions(std::forward<SessionOptions>(sourceOptions));
293 
294  sourceJson << sourceMessage; // serialize
295 
296  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
297  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
298  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
299  printSuccess("DRCETaskRequestSetExecute serialize");
300 
301  sourceJson >> restoreMessage; // unserialize
302 
303  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
304  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
305  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
306  printSuccess("DRCETaskRequestSetExecute unserialize");
307 
308  ASSERT_EQ(restoreMessage.getSessionOptions().sessionType, SessionOptions::SessionType::stSsh);
309  ASSERT_EQ(restoreMessage.getSessionOptions().port, 22);
310  ASSERT_EQ(restoreMessage.getSessionOptions().userName, "user");
311  ASSERT_EQ(restoreMessage.getSessionOptions().userPassword, "123");
312  ASSERT_EQ(restoreMessage.getSessionOptions().shellName, "Shell");
313  ASSERT_EQ(restoreMessage.getSessionOptions().homeDir, ".");
314  ASSERT_EQ(restoreMessage.getSessionOptions().timeout, 43);
315  ASSERT_EQ(restoreMessage.getSessionOptions().tmode, (SessionOptions::ThreadMode)5);
316  ASSERT_EQ(restoreMessage.getSessionOptions().timeMax, 500);
317  ASSERT_EQ(restoreMessage.getSessionOptions().environments.size(), 2);
318  ASSERT_EQ(restoreMessage.getSessionOptions().environments[0].first, "PATH");
319  ASSERT_EQ(restoreMessage.getSessionOptions().environments[0].second, "./");
320  ASSERT_EQ(restoreMessage.getSessionOptions().environments[1].first, "LD_PATH");
321  ASSERT_EQ(restoreMessage.getSessionOptions().environments[1].second, "../");
322 
323  printSuccess("Test SessionOptions");
324 }
325 //-----------------------------------------------------------------------------
327 {
328  DRCETaskRequestSetExecute sourceMessage, restoreMessage;
329 
330  std::stringstream sourceJson;
331  ResourceLimits sourceLimits, restoreLimits;
332  sourceLimits.procMax = 4;
333  sourceLimits.threadsMax = 3;
334  sourceLimits.cpuMax = 2;
335  sourceLimits.vramFree = 125000;
336  sourceLimits.vramFreeMin = 75;
337  sourceLimits.rramFree = 512000;
338  sourceLimits.rramFreeMin = 25;
339  sourceLimits.diskFree = 1024000;
340  sourceLimits.diskFreeMin = 50;
341  sourceMessage.setResourceLimits(std::forward<ResourceLimits>(sourceLimits));
342 
343  sourceJson << sourceMessage; // serialize
344 
345  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
346  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
347  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
348  printSuccess("DRCETaskRequestSetExecute serialize");
349 
350  sourceJson >> restoreMessage; // unserialize
351 
352  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
353  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
354  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
355  printSuccess("DRCETaskRequestSetExecute unserialize");
356 
357  ASSERT_EQ(restoreMessage.getResourceLimits().procMax, 4);
358  ASSERT_EQ(restoreMessage.getResourceLimits().threadsMax, 3);
359  ASSERT_EQ(restoreMessage.getResourceLimits().cpuMax, 2);
360  ASSERT_EQ(restoreMessage.getResourceLimits().vramFree, 125000);
361  ASSERT_EQ(restoreMessage.getResourceLimits().vramFreeMin, 75);
362  ASSERT_EQ(restoreMessage.getResourceLimits().rramFree, 512000);
363  ASSERT_EQ(restoreMessage.getResourceLimits().rramFreeMin, 25);
364  ASSERT_EQ(restoreMessage.getResourceLimits().diskFree, 1024000);
365  ASSERT_EQ(restoreMessage.getResourceLimits().diskFreeMin, 50);
366 
367  printSuccess("Test ResourceLimits");}
368 //-----------------------------------------------------------------------------
370 {
371  DRCETaskRequestSetExecute sourceMessage, restoreMessage;
372 
373  std::stringstream sourceJson;
374  DRCEFilesList sourceFilesList, restoreFilesList;
375 
376  sourceMessage.addFileItem("name1", "data1", FileItem::CREATE_BEFORE_EXEC_AND_WRITE_DATA);
377  sourceMessage.addFileItem("name2", "data2",
379  sourceMessage.addFileItem("name3", "data3",
382  sourceMessage.addFileItem("name4", "data4",
385 
386  sourceJson << sourceMessage; // serialize
387 
388  ASSERT_FALSE(sourceMessage.isError()) << printError(sourceMessage);
389  ASSERT_EQ(sourceMessage.getErrorCode(), NO_ERROR);
390  ASSERT_TRUE(sourceMessage.getErrorMsg().empty());
391  printSuccess("DRCETaskRequestSetExecute serialize");
392 
393  sourceJson >> restoreMessage; // unserialize
394 
395  ASSERT_FALSE(restoreMessage.isError()) << printError(restoreMessage);
396  ASSERT_EQ(restoreMessage.getErrorCode(), NO_ERROR);
397  ASSERT_TRUE(restoreMessage.getErrorMsg().empty());
398  printSuccess("DRCETaskRequestSetExecute unserialize");
399 
400  ASSERT_EQ(restoreMessage.getFilesCount(), 4);
401  ASSERT_EQ(restoreMessage.getFileItem(0).name, "name1");
402  ASSERT_EQ(restoreMessage.getFileItem(0).data, "data1");
403  ASSERT_EQ(restoreMessage.getFileItem(0).actionType, FileItem::CREATE_BEFORE_EXEC_AND_WRITE_DATA);
404 
405  ASSERT_EQ(restoreMessage.getFileItem(1).name, "name2");
406  ASSERT_EQ(restoreMessage.getFileItem(1).data, "data2");
407  ASSERT_EQ(restoreMessage.getFileItem(1).actionType, (FileItem::CREATE_BEFORE_EXEC_AND_WRITE_DATA | FileItem::DELETE_BEFORE_EXEC));
408 
409  ASSERT_EQ(restoreMessage.getFileItem(2).name, "name3");
410  ASSERT_EQ(restoreMessage.getFileItem(2).data, "data3");
411  ASSERT_EQ(restoreMessage.getFileItem(2).actionType, (FileItem::CREATE_BEFORE_EXEC_AND_WRITE_DATA |
413 
414  ASSERT_EQ(restoreMessage.getFileItem(3).name, "name4");
415  ASSERT_EQ(restoreMessage.getFileItem(3).data, "data4");
416  ASSERT_EQ(restoreMessage.getFileItem(3).actionType, (FileItem::CREATE_BEFORE_EXEC_AND_WRITE_DATA |
418 
419  printSuccess("Test FilesItemList");
420 }
421 //-----------------------------------------------------------------------------
422 //-----------------------------------------------------------------------------
423 } // end namespace tests
424 } // end namespace drce
425 } // end namespace HCE