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

Commit14bc733

Browse files
PortManager (#234)
Main- Old PortManager was deleted- PostresNode uses new "abstract" interface PortManager to reserve/release port number.- PostgresNode.free_port always resets port number- OsOperations::is_free_port is added- PostgresNode.start raises exception (InvalidOperationException) if node is NoneRefactoring- PostgresNode::port is RO-property now. It throws if port is None- PostgresNode::host is RO-property now- PostgresNode::ssh_key is RO-property now- PostgresNode::name is RO-property now
1 parent6e7d315 commit14bc733

23 files changed

+993
-431
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 orlocal_ops\" bash ./run_tests.sh;"
118+
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal orlocal\" bash ./run_tests.sh;"

‎Dockerfile--altlinux_11.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 orlocal_ops\" bash ./run_tests.sh;"
118+
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal orlocal\" bash ./run_tests.sh;"

‎Dockerfile--ubuntu_24_04.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN apt install -y sudo curl ca-certificates
1010
RUN apt update
1111
RUN apt install -y openssh-server
1212
RUN apt install -y time
13+
RUN apt install -y netcat-traditional
1314

1415
RUN apt update
1516
RUN apt install -y postgresql-common

‎run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
set -eux
66

77
if [-z${TEST_FILTER+x} ]; \
8-
thenexport TEST_FILTER="TestTestgresLocal or (TestTestgresCommon and (notremote_ops))"; \
8+
thenexport TEST_FILTER="TestTestgresLocal or (TestTestgresCommon and (notremote))"; \
99
fi
1010

1111
# fail early

‎setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
setup(
3030
version='1.10.5',
3131
name='testgres',
32-
packages=['testgres','testgres.operations','testgres.helpers'],
32+
packages=['testgres','testgres.operations'],
3333
description='Testing utility for PostgreSQL and its extensions',
3434
url='https://github.com/postgrespro/testgres',
3535
long_description=readme,

‎testgres/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
DumpFormat
3535

3636
from .nodeimportPostgresNode,NodeApp
37+
from .nodeimportPortManager
3738

3839
from .utilsimport \
3940
reserve_port, \
@@ -53,8 +54,6 @@
5354
from .operations.local_opsimportLocalOperations
5455
from .operations.remote_opsimportRemoteOperations
5556

56-
from .helpers.port_managerimportPortManager
57-
5857
__all__= [
5958
"get_new_node",
6059
"get_remote_node",
@@ -64,7 +63,8 @@
6463
"TestgresException","ExecUtilException","QueryException","TimeoutException","CatchUpException","StartNodeException","InitNodeException","BackupException","InvalidOperationException",
6564
"XLogMethod","IsolationLevel","NodeStatus","ProcessType","DumpFormat",
6665
"PostgresNode","NodeApp",
66+
"PortManager",
6767
"reserve_port","release_port","bound_ports","get_bin_path","get_pg_config","get_pg_version",
68-
"First","Any","PortManager",
68+
"First","Any",
6969
"OsOperations","LocalOperations","RemoteOperations","ConnectionParams"
7070
]

‎testgres/exceptions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ class TestgresException(Exception):
77
pass
88

99

10+
classPortForException(TestgresException):
11+
pass
12+
13+
1014
@six.python_2_unicode_compatible
1115
classExecUtilException(TestgresException):
1216
def__init__(self,message=None,command=None,exit_code=0,out=None,error=None):

‎testgres/helpers/__init__.py

Whitespace-only changes.

‎testgres/helpers/port_manager.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp