Skip to content

Commit ba6c535

Browse files
CI: Execution of all the tests on altlinux 10/11 is restored (#322)
* CI: Execution of all the tests on altlinux 10/11 is restored * fix: TestOsOpsCommon::test_get_tmpdir__compare_with_py_info is corrected 1) tempfile.tempdir can return None 2) we have to call tempfile.gettempdir() within ssh connection * [CI] fix: altlinux-11 does not have pgrep We have to install procps package.
1 parent bb5d9ae commit ba6c535

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Dockerfile--altlinux_10.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
115115
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
116116
chmod 600 ~/.ssh/authorized_keys; \
117117
ls -la ~/.ssh/; \
118-
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local\" bash ./run_tests.sh;"
118+
TEST_FILTER=\"\" bash ./run_tests.sh;"

Dockerfile--altlinux_11.tmpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ RUN apt-get update
1111
RUN apt-get install -y openssh-server openssh-clients
1212
RUN apt-get install -y time
1313

14+
# pgrep (for testgres.os_ops)
15+
RUN apt-get install -y procps
16+
1417
# RUN apt-get install -y mc
1518

1619
RUN apt-get install -y libsqlite3-devel
@@ -115,4 +118,4 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
115118
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
116119
chmod 600 ~/.ssh/authorized_keys; \
117120
ls -la ~/.ssh/; \
118-
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local\" bash ./run_tests.sh;"
121+
TEST_FILTER=\"\" bash ./run_tests.sh;"

tests/test_os_ops_common.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,8 +876,16 @@ def test_get_tmpdir__compare_with_py_info(self, os_ops: OsOperations):
876876
actual_dir = os_ops.get_tempdir()
877877
assert actual_dir is not None
878878
assert type(actual_dir) == str # noqa: E721
879-
expected_dir = str(tempfile.tempdir)
880-
assert actual_dir == expected_dir
879+
880+
# --------
881+
cmd = [sys.executable, "-c", "import tempfile;print(tempfile.gettempdir());"]
882+
883+
expected_dir_b = os_ops.exec_command(cmd)
884+
assert type(expected_dir_b) == bytes # noqa: E721
885+
expected_dir = expected_dir_b.decode()
886+
assert type(expected_dir) == str # noqa: E721
887+
assert actual_dir + "\n" == expected_dir
888+
return
881889

882890
class tagData_OS_OPS__NUMS:
883891
os_ops_descr: OsOpsDescr

0 commit comments

Comments
 (0)