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

Resolve Window IntegTest copy and startup issues #2892

Merged
Show file tree
Hide file tree
Changes from 1 commit
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/dependency_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def download_dist(self, dest: str) -> str:
return self.download_or_copy(self.bundle_manifest.build.location, local_path)

def __source_dest(self, path: str, category: str, dest: str) -> Tuple[str, str]:
source = "/".join([self.root_url, category, self.build_manifest.build.filename, path])
dest = os.path.realpath(os.path.join(dest, "/".join(path.split("/")[1:])))
source = os.path.join(self.root_url, category, self.build_manifest.build.filename, path)
dest = os.path.realpath(os.path.join(dest, os.path.join(*path.split(os.sep)[1:])))
return (source, dest)

def download(self, paths: List[str], category: str, dest: str) -> None:
Expand Down
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 @@ -33,8 +33,8 @@ def install(self, bundle_name: str) -> None:
@property
def start_cmd(self) -> str:
start_cmd_map = {
"opensearch": "./opensearch-windows-install.bat",
"opensearch-dashboards": "./opensearch-dashboards.bat",
"opensearch": ".\\opensearch-windows-install.bat",
"opensearch-dashboards": ".\\opensearch-dashboards.bat",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: just realized that DistributionZip is really a DistributionWindowsZip and DistributionTar is really DistributionLinuxTar. Consider renaming.

}
return start_cmd_map[self.filename]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def test_install(self) -> None:
mock_zipfile_extractall.assert_called_with(self.work_dir)

def test_start_cmd(self) -> None:
self.assertEqual(self.distribution_zip.start_cmd, "./opensearch-windows-install.bat")
self.assertEqual(self.distribution_zip.start_cmd, ".\\opensearch-windows-install.bat")

@patch("subprocess.check_call")
def test_uninstall(self, check_call_mock: Mock) -> None:
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_install(self) -> None:
mock_zipfile_extractall.assert_called_with(self.work_dir)

def test_start_cmd(self) -> None:
self.assertEqual(self.distribution_zip.start_cmd, "./opensearch-dashboards.bat")
self.assertEqual(self.distribution_zip.start_cmd, ".\\opensearch-dashboards.bat")

@patch("subprocess.check_call")
def test_uninstall(self, check_call_mock: Mock) -> None:
Expand Down