Skip to content

PortManager #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
09dab31
PostgresNode refactoring [PostgresNodePortManager and RO-properties]
dmitry-lipetsk Apr 3, 2025
ef095d3
[FIX] clone_with_new_name_and_base_dir did not respect port_manager
dmitry-lipetsk Apr 4, 2025
0f842fd
PostgresNodePortManager__ThisHost is defined (was: PostgresNodePortMa…
dmitry-lipetsk Apr 4, 2025
e1e609e
PostgresNodePortManager__Generic is added
dmitry-lipetsk Apr 4, 2025
285e5b7
PostgresNodePortManager is added in public API
dmitry-lipetsk Apr 4, 2025
a974866
Test structures were refactored (local, local2, remote)
dmitry-lipetsk Apr 4, 2025
110947d
CI files are updated
dmitry-lipetsk Apr 4, 2025
4f49dde
TestTestgresCommon.test_pgbench is added
dmitry-lipetsk Apr 4, 2025
4fbf51d
PostgresNodePortManager is updated [error messages]
dmitry-lipetsk Apr 4, 2025
17c73cb
PostgresNodePortManager(+company) was moved in own file - port_manage…
dmitry-lipetsk Apr 4, 2025
b1cee19
PortManager was deleted [amen]
dmitry-lipetsk Apr 4, 2025
c5ad907
PostgresNodePortManager was renamed with PortManager
dmitry-lipetsk Apr 4, 2025
0967057
TestTestgresCommon.test_unix_sockets is added
dmitry-lipetsk Apr 4, 2025
1d450b2
TestTestgresCommon.test_the_same_port is added
dmitry-lipetsk Apr 4, 2025
4a38b35
[TestTestgresCommon] New tests are added
dmitry-lipetsk Apr 4, 2025
322fb23
RemoteOperations::is_port_free is updated
dmitry-lipetsk Apr 4, 2025
94da63e
Tests for OsOps::is_port_free are added
dmitry-lipetsk Apr 4, 2025
88f9b73
TestTestgresCommon is corrected [python problems]
dmitry-lipetsk Apr 4, 2025
d9558ce
The call of RaiseError.CommandExecutionError is fixed [message, not m…
dmitry-lipetsk Apr 4, 2025
0da4c21
[CI] ubuntu 24.04 does not have nc
dmitry-lipetsk Apr 4, 2025
0058508
RemoteOperations is update [private method names]
dmitry-lipetsk Apr 5, 2025
8f3a566
test_is_port_free__true is updated
dmitry-lipetsk Apr 5, 2025
d8ebdb7
RemoteOperations::is_port_free is updated (comments)
dmitry-lipetsk Apr 5, 2025
30e472c
setup.py is updated [testgres.helpers was deleted]
dmitry-lipetsk Apr 5, 2025
c94bbb5
Comment in node.py is updated
dmitry-lipetsk Apr 5, 2025
04f88c7
PostgresNode::_node was deleted [use self._os_ops.host]
dmitry-lipetsk Apr 5, 2025
0a3442a
PostgresNode::start is corrected [error message]
dmitry-lipetsk Apr 5, 2025
30124f3
Merge branch 'master' into D20250403_001--port_manager
dmitry-lipetsk Apr 5, 2025
13e71d8
[FIX] PostgresNode.__init__ must not test "os_ops.host" attribute.
dmitry-lipetsk Apr 5, 2025
9e14f4a
PostgresNode.free_port always set a port to None
dmitry-lipetsk Apr 6, 2025
739ef61
[FIX] flake8 (noqa: E721)
dmitry-lipetsk Apr 6, 2025
696cc1e
PortManager__Generic is refactored
dmitry-lipetsk Apr 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile--altlinux_10.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
chmod 600 ~/.ssh/authorized_keys; \
ls -la ~/.ssh/; \
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local_ops\" bash ./run_tests.sh;"
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local\" bash ./run_tests.sh;"
2 changes: 1 addition & 1 deletion Dockerfile--altlinux_11.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \
chmod 600 ~/.ssh/authorized_keys; \
ls -la ~/.ssh/; \
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local_ops\" bash ./run_tests.sh;"
TEST_FILTER=\"TestTestgresLocal or TestOsOpsLocal or local\" bash ./run_tests.sh;"
1 change: 1 addition & 0 deletions Dockerfile--ubuntu_24_04.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ RUN apt install -y sudo curl ca-certificates
RUN apt update
RUN apt install -y openssh-server
RUN apt install -y time
RUN apt install -y netcat-traditional

RUN apt update
RUN apt install -y postgresql-common
Expand Down
2 changes: 1 addition & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
set -eux

if [ -z ${TEST_FILTER+x} ]; \
then export TEST_FILTER="TestTestgresLocal or (TestTestgresCommon and (not remote_ops))"; \
then export TEST_FILTER="TestTestgresLocal or (TestTestgresCommon and (not remote))"; \
fi

# fail early
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
setup(
version='1.10.5',
name='testgres',
packages=['testgres', 'testgres.operations', 'testgres.helpers'],
packages=['testgres', 'testgres.operations'],
description='Testing utility for PostgreSQL and its extensions',
url='https://github.com/postgrespro/testgres',
long_description=readme,
Expand Down
6 changes: 3 additions & 3 deletions testgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
DumpFormat

from .node import PostgresNode, NodeApp
from .node import PortManager

from .utils import \
reserve_port, \
Expand All @@ -53,8 +54,6 @@
from .operations.local_ops import LocalOperations
from .operations.remote_ops import RemoteOperations

from .helpers.port_manager import PortManager

__all__ = [
"get_new_node",
"get_remote_node",
Expand All @@ -64,7 +63,8 @@
"TestgresException", "ExecUtilException", "QueryException", "TimeoutException", "CatchUpException", "StartNodeException", "InitNodeException", "BackupException", "InvalidOperationException",
"XLogMethod", "IsolationLevel", "NodeStatus", "ProcessType", "DumpFormat",
"PostgresNode", "NodeApp",
"PortManager",
"reserve_port", "release_port", "bound_ports", "get_bin_path", "get_pg_config", "get_pg_version",
"First", "Any", "PortManager",
"First", "Any",
"OsOperations", "LocalOperations", "RemoteOperations", "ConnectionParams"
]
4 changes: 4 additions & 0 deletions testgres/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ class TestgresException(Exception):
pass


class PortForException(TestgresException):
pass


@six.python_2_unicode_compatible
class ExecUtilException(TestgresException):
def __init__(self, message=None, command=None, exit_code=0, out=None, error=None):
Expand Down
Empty file removed testgres/helpers/__init__.py
Empty file.
41 changes: 0 additions & 41 deletions testgres/helpers/port_manager.py

This file was deleted.

Loading