Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 20:35:01 active_protection_linux\test\test_bvt.py .test_install_uninstall --- passed --- 73.5690000057
- 20:35:03
- 20:35:03 active_protection_linux\test\test_fs_operations_tracking.py Ftest_fs_file_operations[fs_file_read] --- failed --- 0.105000019073
- 20:35:03
- 20:35:03
- 20:35:03 ================================== FAILURES ===================================
- 20:35:03 _______________ TestAplFs.test_fs_file_operations[fs_file_read] _______________
- 20:35:03
- 20:35:03 self = <active_protection_linux.test.test_fs_operations_tracking.TestAplFs instance at 0x03F0DD00>
- 20:35:03 operation_type = 'fs_file_read'
- 20:35:03
- 20:35:03 @pytest.mark.bvt
- 20:35:03 @pytest.mark.parametrize("operation_type", [
- 20:35:03 "fs_file_read",
- 20:35:03 "fs_file_write"
- 20:35:03 ])
- 20:35:03 def test_fs_file_operations(self, operation_type):
- 20:35:03
- 20:35:03 try:
- 20:35:03 fs_object = self.fs_operations[operation_type]
- 20:35:03 except KeyError as e:
- 20:35:03 self.log.error("attempt to run not existing type of fs operation {operation}, exiting ...".format(operation=str(e)))
- 20:35:03 pytest.fail("\nTrying to run not implemented fs operation:\n\n" +
- 20:35:03 "---------------------" + "\n" +
- 20:35:03 str(e) + "\n"
- 20:35:03 "---------------------\n")
- 20:35:03
- 20:35:03 test_success = False
- 20:35:03
- 20:35:03 try:
- 20:35:03 self.log.info(fs_object.log_message_info)
- 20:35:03
- 20:35:03 cmd_result = self.vm_interaction.execute(fs_object.cmd)
- 20:35:03 code = cmd_result.code
- 20:35:03 pid = cmd_result.out.split("\n")[0]
- 20:35:03
- 20:35:03 with open(self.apl_daemon_log, "r") as daemon_log:
- 20:35:03 for line in daemon_log.readlines():
- 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:
- 20:35:03 test_success = True
- 20:35:03 break
- 20:35:03 assert test_success, '{fs_operation_type} test failed with error code "{code}"'.format(fs_operation_type=operation_type, code=code)
- 20:35:03
- 20:35:03 except Exception as e:
- 20:35:03 self.log.error(fs_object.log_message_fail)
- 20:35:03 pytest.fail(fs_object.log_message_fail + "\nExact error message:\n\n" +
- 20:35:03 "---------------------" + "\n" +
- 20:35:03 > str(e) + "\n"
- 20:35:03 "---------------------\n")
- 20:35:03 E Failed: fs_file_read test failed
- 20:35:03 E Exact error message:
- 20:35:03 E
- 20:35:03 E ---------------------
- 20:35:03 E [Errno 2] No such file or directory: '/var/log/Acronis/active-protection.log'
- 20:35:03 E ---------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement