Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.98 KB | None | 0 0
  1. 20:35:01 active_protection_linux\test\test_bvt.py .test_install_uninstall --- passed --- 73.5690000057
  2. 20:35:03
  3. 20:35:03 active_protection_linux\test\test_fs_operations_tracking.py Ftest_fs_file_operations[fs_file_read] --- failed --- 0.105000019073
  4. 20:35:03
  5. 20:35:03
  6. 20:35:03 ================================== FAILURES ===================================
  7. 20:35:03 _______________ TestAplFs.test_fs_file_operations[fs_file_read] _______________
  8. 20:35:03
  9. 20:35:03 self = <active_protection_linux.test.test_fs_operations_tracking.TestAplFs instance at 0x03F0DD00>
  10. 20:35:03 operation_type = 'fs_file_read'
  11. 20:35:03
  12. 20:35:03     @pytest.mark.bvt
  13. 20:35:03     @pytest.mark.parametrize("operation_type", [
  14. 20:35:03         "fs_file_read",
  15. 20:35:03         "fs_file_write"
  16. 20:35:03     ])
  17. 20:35:03     def test_fs_file_operations(self, operation_type):
  18. 20:35:03    
  19. 20:35:03         try:
  20. 20:35:03             fs_object = self.fs_operations[operation_type]
  21. 20:35:03         except KeyError as e:
  22. 20:35:03             self.log.error("attempt to run not existing type of fs operation {operation}, exiting ...".format(operation=str(e)))
  23. 20:35:03             pytest.fail("\nTrying to run not implemented fs operation:\n\n" +
  24. 20:35:03                         "---------------------" + "\n" +
  25. 20:35:03                         str(e) + "\n"
  26. 20:35:03                         "---------------------\n")
  27. 20:35:03    
  28. 20:35:03         test_success = False
  29. 20:35:03    
  30. 20:35:03         try:
  31. 20:35:03             self.log.info(fs_object.log_message_info)
  32. 20:35:03    
  33. 20:35:03             cmd_result = self.vm_interaction.execute(fs_object.cmd)
  34. 20:35:03             code = cmd_result.code
  35. 20:35:03             pid = cmd_result.out.split("\n")[0]
  36. 20:35:03    
  37. 20:35:03             with open(self.apl_daemon_log, "r") as daemon_log:
  38. 20:35:03                 for line in daemon_log.readlines():
  39. 20:35:03                     if "active-protection" in line and "pid=" + pid.strip() in line and "fs_event_type=" + fs_object.fs_event_type in line and self.fs_test_file_name in line:
  40. 20:35:03                         test_success = True
  41. 20:35:03                         break
  42. 20:35:03             assert test_success, '{fs_operation_type} test failed with error code "{code}"'.format(fs_operation_type=operation_type, code=code)
  43. 20:35:03    
  44. 20:35:03         except Exception as e:
  45. 20:35:03             self.log.error(fs_object.log_message_fail)
  46. 20:35:03             pytest.fail(fs_object.log_message_fail + "\nExact error message:\n\n" +
  47. 20:35:03                         "---------------------" + "\n" +
  48. 20:35:03 >                       str(e) + "\n"
  49. 20:35:03                         "---------------------\n")
  50. 20:35:03 E           Failed: fs_file_read test failed
  51. 20:35:03 E           Exact error message:
  52. 20:35:03 E          
  53. 20:35:03 E           ---------------------
  54. 20:35:03 E           [Errno 2] No such file or directory: '/var/log/Acronis/active-protection.log'
  55. 20:35:03 E           ---------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement