Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows Container] Make sure WindowsZip/LinuxTar remove correct dir when uninstall #4023

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/test_workflow/integ_test/distribution_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def start_cmd(self) -> str:
return start_cmd_map[self.filename]

def uninstall(self) -> None:
logging.info(f"Cleanup {self.work_dir}/* content after the test")
subprocess.check_call(f"rm -rf {self.work_dir}/*", shell=True)
logging.info(f"Cleanup {self.install_dir} content after the test")
subprocess.check_call(f"rm -rf {self.install_dir}", shell=True)
peterzhuamazon marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 2 additions & 2 deletions src/test_workflow/integ_test/distribution_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ def start_cmd(self) -> str:
return start_cmd_map[self.filename]

def uninstall(self) -> None:
logging.info(f"Cleanup {self.work_dir}/* content after the test")
subprocess.check_call(f"rm -rf {self.work_dir}/*", shell=True)
logging.info(f"Cleanup {self.install_dir} content after the test")
subprocess.check_call(f"rm -rf {self.install_dir}", shell=True)
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ def test_uninstall(self, check_call_mock: Mock) -> None:
args_list = check_call_mock.call_args_list

self.assertEqual(check_call_mock.call_count, 1)
self.assertEqual(f"rm -rf {self.work_dir}/*", args_list[0][0][0])
self.assertEqual(f"rm -rf {os.path.join(self.work_dir, 'opensearch-1.3.0')}", args_list[0][0][0])
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_uninstall(self, check_call_mock: Mock) -> None:
args_list = check_call_mock.call_args_list

self.assertEqual(check_call_mock.call_count, 1)
self.assertEqual(f"rm -rf {self.work_dir}/*", args_list[0][0][0])
self.assertEqual(f"rm -rf {os.path.join(self.work_dir, 'opensearch-2.4.0')}", args_list[0][0][0])


class TestDistributionZipOpenSearchDashboards(unittest.TestCase):
Expand Down Expand Up @@ -97,4 +97,4 @@ def test_uninstall(self, check_call_mock: Mock) -> None:
args_list = check_call_mock.call_args_list

self.assertEqual(check_call_mock.call_count, 1)
self.assertEqual(f"rm -rf {self.work_dir}/*", args_list[0][0][0])
self.assertEqual(f"rm -rf {os.path.join(self.work_dir, 'opensearch-dashboards-2.4.0')}", args_list[0][0][0])
Loading