Skip to content

Commit

Permalink
revert changes to export after checking logs to see that admin passwo…
Browse files Browse the repository at this point in the history
…rd succcesfully set

Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho committed Jan 10, 2024
1 parent 5d8d699 commit 6bd68e9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/test_workflow/integ_test/distribution_tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def install(self, bundle_name: str) -> None:
@property
def start_cmd(self) -> str:
start_cmd_map = {
"opensearch": "env OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! ./opensearch-tar-install.sh",
"opensearch": "export OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! && ./opensearch-tar-install.sh",
"opensearch-dashboards": "./opensearch-dashboards",
}
return start_cmd_map[self.filename]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_install(self) -> None:
mock_tarfile_extractall.assert_called_with(self.work_dir)

def test_start_cmd(self) -> None:
self.assertEqual(self.distribution_tar.start_cmd, "env OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! ./opensearch-tar-install.sh")
self.assertEqual(self.distribution_tar.start_cmd, "export OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! && ./opensearch-tar-install.sh")
self.assertEqual(self.distribution_tar_dashboards.start_cmd, "./opensearch-dashboards")

@patch("subprocess.check_call")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def test_start(self, mock_tarfile_open: Mock, mock_dump: Mock, mock_file: Mock,
# call test target function
service.start()

mock_process.assert_called_once_with("env OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! ./opensearch-tar-install.sh", os.path.join(self.work_dir, "opensearch-1.1.0"), False)
mock_process.assert_called_once_with("export OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123! && ./opensearch-tar-install.sh", os.path.join(self.work_dir, "opensearch-1.1.0"), False)

mock_dump.assert_called_once_with(self.additional_config)

Expand Down

0 comments on commit 6bd68e9

Please sign in to comment.