Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc59e6b0

Browse files
[CI] Run tests on AltLinux 10
Changes: - VIRTUALENV: virtualenv is explicitly executed through ${PYTHON}The current problems1) testgres/operations/helpers.py # Prepared pointer on function to get a name of system codepage _get_default_encoding_func = _make_get_default_encoding_func()must be # Prepared pointer on function to get a name of system codepage _get_default_encoding_func = _make_get_default_encoding_func.__func__()It is a problem of Python 3.92) These tests fail:FAILED tests/test_simple.py::TestgresTests::test_logical_replication - psycopg2.errors.ProtocolViolation: could not create replication slot "mysub": ERROR: could not access file "pgoutput": No such file or directoryFAILED tests/test_simple.py::TestgresTests::test_logical_catchup - psycopg2.errors.ProtocolViolation: could not create replication slot "mysub": ERROR: could not access file "pgoutput": No such file or directoryFAILED tests/test_simple_remote.py::TestgresRemoteTests::test_logical_replication - psycopg2.errors.ProtocolViolation: could not create replication slot "mysub": ERROR: could not access file "pgoutput": No such file or directoryFAILED tests/test_simple_remote.py::TestgresRemoteTests::test_logical_catchup - psycopg2.errors.ProtocolViolation: could not create replication slot "mysub": ERROR: could not access file "pgoutput": No such file or directoryI suggest to fix these problems in the separated commits.
1 parentbab1d8e commitc59e6b0

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

‎.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ env:
2828
-TEST_PLATFORM=std PYTHON_VERSION=3 PG_VERSION=10
2929
-TEST_PLATFORM=std-all PYTHON_VERSION=3 PG_VERSION=17
3030
-TEST_PLATFORM=ubuntu_24_04 PYTHON_VERSION=3 PG_VERSION=17
31+
-TEST_PLATFORM=altlinux_10 PYTHON_VERSION=3 PG_VERSION=17

‎Dockerfile--altlinux_10.tmpl

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
ARG PG_VERSION
2+
ARG PYTHON_VERSION
3+
4+
# --------------------------------------------- base1
5+
FROM alt:p10 as base1
6+
ARG PG_VERSION
7+
8+
RUN apt-get update
9+
RUN apt-get install -y sudo curl ca-certificates
10+
RUN apt-get update
11+
RUN apt-get install -y openssh-server openssh-clients
12+
RUN apt-get install -y time
13+
14+
RUN apt-get install -y mc
15+
16+
RUN apt-get update
17+
RUN apt-get install -y postgresql-common
18+
RUN apt-get install -y postgresql${PG_VERSION}-server
19+
RUN apt-get install -y postgresql${PG_VERSION}-server-devel
20+
21+
RUN apt-get install -y libsqlite3-devel
22+
23+
EXPOSE 22
24+
25+
RUN ssh-keygen -A
26+
27+
# --------------------------------------------- base2_with_python-3
28+
FROM base1 as base2_with_python-3
29+
RUN apt-get install -y python3
30+
RUN apt-get install -y python3-dev
31+
RUN apt-get install -y python3-module-virtualenv
32+
RUN apt-get install -y python3-modules-sqlite3
33+
ENV PYTHON_VERSION=3
34+
35+
# --------------------------------------------- final
36+
FROM base2_with_python-${PYTHON_VERSION} as final
37+
38+
RUN adduser test -G wheel
39+
40+
# It enables execution of "sudo service ssh start" without password
41+
RUN sh -c "echo \"WHEEL_USERS ALL=(ALL:ALL) NOPASSWD: ALL\"" >> /etc/sudoers
42+
43+
ADD . /pg/testgres
44+
WORKDIR /pg/testgres
45+
RUN chown -R test /pg
46+
47+
ENV LANG=C.UTF-8
48+
49+
USER test
50+
51+
RUN chmod 700 ~/
52+
RUN mkdir -p ~/.ssh
53+
54+
ENTRYPOINT sh -c " \
55+
set -eux; \
56+
echo HELLO FROM ENTRYPOINT; \
57+
echo HOME DIR IS [`realpath ~/`]; \
58+
sudo /usr/sbin/sshd; \
59+
ssh-keyscan -H localhost >> ~/.ssh/known_hosts; \
60+
ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts; \
61+
ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
62+
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
63+
chmod 600 ~/.ssh/authorized_keys; \
64+
ls -la ~/.ssh/; \
65+
TEST_FILTER=\"\" bash ./run_tests.sh;"
66+

‎run_tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ if [ -z ${TEST_FILTER+x} ]; then export TEST_FILTER="TestgresTests"; fi
88

99
# choose python version
1010
echo python version is$PYTHON_VERSION
11-
VIRTUALENV="virtualenv --python=/usr/bin/python$PYTHON_VERSION"
11+
PYTHON="python$PYTHON_VERSION"
1212
PIP="pip$PYTHON_VERSION"
13+
VIRTUALENV="${PYTHON} -m virtualenv --python=/usr/bin/python$PYTHON_VERSION"
1314

1415
# fail early
1516
echo check that pg_config isin PATH

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp