Skip to content

Commit bf9257f

Browse files
Add permission changes so that integTest can change configs
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent 0bc17f2 commit bf9257f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/test_workflow/integ_test/distribution_deb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def install(self, bundle_name: str) -> None:
4040
'--install',
4141
bundle_name,
4242
'&&',
43-
f'sudo chmod 0666 {self.config_path}'
43+
f'sudo chmod 0755 {self.config_path}'
4444
]
4545
)
4646
subprocess.check_call(deb_install_cmd, cwd=self.work_dir, shell=True)

src/test_workflow/integ_test/distribution_rpm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def install(self, bundle_name: str) -> None:
4242
'-y',
4343
bundle_name,
4444
'&&',
45-
f'sudo chmod 0666 {self.config_path}'
45+
f'sudo chmod 0755 {self.config_path}'
4646
]
4747
)
4848
subprocess.check_call(rpm_install_cmd, cwd=self.work_dir, shell=True)

tests/tests_test_workflow/test_integ_workflow/integ_test/test_distribution_deb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_install(self, check_call_mock: Mock) -> None:
4040
args_list = check_call_mock.call_args_list
4141

4242
self.assertEqual(check_call_mock.call_count, 1)
43-
self.assertEqual(f"sudo dpkg --purge opensearch && sudo dpkg --install opensearch.deb && sudo chmod 0666 {self.distribution_deb.config_path}", args_list[0][0][0])
43+
self.assertEqual(f"sudo dpkg --purge opensearch && sudo dpkg --install opensearch.deb && sudo chmod 0755 {self.distribution_deb.config_path}", args_list[0][0][0])
4444

4545
def test_start_cmd(self) -> None:
4646
self.assertEqual(self.distribution_deb.start_cmd, "sudo systemctl start opensearch")

tests/tests_test_workflow/test_integ_workflow/integ_test/test_distribution_rpm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_install(self, check_call_mock: Mock) -> None:
4040
args_list = check_call_mock.call_args_list
4141

4242
self.assertEqual(check_call_mock.call_count, 1)
43-
self.assertEqual(f"sudo yum remove -y opensearch && sudo yum install -y opensearch.rpm && sudo chmod 0666 {self.distribution_rpm.config_path}", args_list[0][0][0])
43+
self.assertEqual(f"sudo yum remove -y opensearch && sudo yum install -y opensearch.rpm && sudo chmod 0755 {self.distribution_rpm.config_path}", args_list[0][0][0])
4444

4545
def test_start_cmd(self) -> None:
4646
self.assertEqual(self.distribution_rpm.start_cmd, "sudo systemctl start opensearch")

0 commit comments

Comments
 (0)