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

TestTestgresCommon - unified tests for local and remote#216

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Changes from1 commit
Commits
Show all changes
26 commits
Select commitHold shift + click to select a range
5488ecd
TestTestgresCommon - unified tests for local and remote
dmitry-lipetskMar 12, 2025
a6edd3a
TestTestgresCommon is updated
dmitry-lipetskMar 12, 2025
3c055af
TestTestgresCommon is updated
dmitry-lipetskMar 13, 2025
188b3b2
TestTestgresCommon is updated
dmitry-lipetskMar 13, 2025
9b137ca
Merge branch 'master' into D20250312_002--TestTestgresCommon
dmitry-lipetskMar 13, 2025
9bddc3b
Merge branch 'master' into D20250312_002--TestTestgresCommon
dmitry-lipetskMar 14, 2025
75f0326
Merge branch 'master' into D20250312_002--TestTestgresCommon
dmitry-lipetskMar 16, 2025
292b403
TestTestgresCommon is updated
dmitry-lipetskMar 16, 2025
0fb22e8
PostgresNode_Base is added
dmitry-lipetskMar 16, 2025
2e5bd9d
test_simple_remote.py is cleaned
dmitry-lipetskMar 16, 2025
7f89186
Merge branch 'master' into D20250312_002--TestTestgresCommon
dmitry-lipetskMar 16, 2025
48fd887
Formatting (flake8)
dmitry-lipetskMar 16, 2025
bf28a1a
Formatting
dmitry-lipetskMar 17, 2025
f64dd60
PostgresNode_Base is updated (documentation)
dmitry-lipetskMar 17, 2025
490130e
PostgresNode is updated (documentation)
dmitry-lipetskMar 17, 2025
ff9b7bc
PostgresNode_Base::_prefix is removed
dmitry-lipetskMar 17, 2025
9e1979f
PostgresNode::clean is corrected
dmitry-lipetskMar 17, 2025
3e9cad1
node_base.py is updated
dmitry-lipetskMar 17, 2025
12fa7f2
node_base.py is updated
dmitry-lipetskMar 17, 2025
cef7982
node.py is updated
dmitry-lipetskMar 17, 2025
61feb2c
NodeApp::make_empty is updated
dmitry-lipetskMar 17, 2025
84a51c7
PostgresNode::cleanup is fixed
dmitry-lipetskMar 17, 2025
f7f915d
PostgresNode::cleanup is updated (flake8)
dmitry-lipetskMar 17, 2025
882b8ec
PostgresNode_Base::clone_with_new_name_and_base_dir is added
dmitry-lipetskMar 17, 2025
e8e392e
PostgresNode is updated (comment)
dmitry-lipetskMar 17, 2025
06287f2
Merge remote-tracking branch 'origin/D20250316_003--PostgresNode_Base…
dmitry-lipetskMar 17, 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
PrevPrevious commit
NextNext commit
PostgresNode_Base is updated (documentation)
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedMar 17, 2025
commitf64dd60b5f7e8bc3e725baf31fda3536a15b93d8
31 changes: 16 additions & 15 deletionstestgres/node_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -129,9 +129,10 @@ class PostgresNode_Base(object):

def __init__(self, os_ops: OsOperations, name=None, port=None, bin_dir=None, prefix=None):
"""
PostgresNode constructor.
PostgresNode_Base constructor.

Args:
os_ops: OS operations object.
name: node's application name.
port: port to accept connections.
bin_dir: path to node's binary directory.
Expand DownExpand Up@@ -648,7 +649,7 @@ def init(self, initdb_params=None, cached=True, **kwargs):
allow_streaming: should this node add a hba entry for replication?

Returns:
This instance of :class:`.PostgresNode`
This instance of :class:`.PostgresNode_Base`
"""

# initialize this PostgreSQL node
Expand DownExpand Up@@ -682,7 +683,7 @@ def default_conf(self,
log_statement: one of ('all', 'off', 'mod', 'ddl').

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

postgres_conf = os.path.join(self.data_dir, PG_CONF_FILE)
Expand DownExpand Up@@ -779,7 +780,7 @@ def append_conf(self, line='', filename=PG_CONF_FILE, **kwargs):
**kwargs: named config options.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.

Examples:
>>> append_conf(fsync=False)
Expand DownExpand Up@@ -916,7 +917,7 @@ def start(self, params=[], wait=True):
wait: wait until operation completes.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

assert __class__._C_MAX_START_ATEMPTS > 1
Expand DownExpand Up@@ -1009,7 +1010,7 @@ def stop(self, params=[], wait=True):
wait: If True, waits until the operation is complete. Defaults to True.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""
if not self.is_started:
return self
Expand DownExpand Up@@ -1051,7 +1052,7 @@ def restart(self, params=[]):
params: additional arguments for pg_ctl.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

_params = [
Expand DownExpand Up@@ -1083,7 +1084,7 @@ def reload(self, params=[]):
params: additional arguments for pg_ctl.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

_params = [
Expand All@@ -1104,7 +1105,7 @@ def promote(self, dbname=None, username=None):
needed.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

_params = [
Expand DownExpand Up@@ -1173,7 +1174,7 @@ def cleanup(self, max_attempts=3, full=False):
full: clean full base dir

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

self._try_shutdown(max_attempts)
Expand DownExpand Up@@ -1534,13 +1535,13 @@ def set_synchronous_standbys(self, standbys):
"""
Set standby synchronization options. This corresponds to
`synchronous_standby_names <https://www.postgresql.org/docs/current/static/runtime-config-replication.html#GUC-SYNCHRONOUS-STANDBY-NAMES>`_
option. Note that :meth:`~.PostgresNode.reload` or
:meth:`~.PostgresNode.restart` is needed for changes to take place.
option. Note that :meth:`~.PostgresNode_Base.reload` or
:meth:`~.PostgresNode_Base.restart` is needed for changes to take place.

Args:
standbys: either :class:`.First` or :class:`.Any` object specifying
synchronization parameters or just a plain list of
:class:`.PostgresNode`s replicas which would be equivalent
:class:`.PostgresNode_Base`s replicas which would be equivalent
to passing ``First(1, <list>)``. For PostgreSQL 9.5 and below
it is only possible to specify a plain list of standbys as
`FIRST` and `ANY` keywords aren't supported.
Expand DownExpand Up@@ -1700,7 +1701,7 @@ def pgbench_init(self, **kwargs):
Sets initialize=True.

Returns:
This instance of :class:`.PostgresNode`.
This instance of :class:`.PostgresNode_Base`.
"""

self.pgbench_run(initialize=True, **kwargs)
Expand DownExpand Up@@ -1915,7 +1916,7 @@ def upgrade_from(self, old_node, options=None, expect_error=False):
Upgrade this node from an old node using pg_upgrade.

Args:
old_node:An instance ofPostgresNode representing the old node.
old_node:A result ofcommand operation.
"""
if not os.path.exists(old_node.data_dir):
raise Exception("Old node must be initialized")
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp