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
Show file tree
Hide file tree
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::clean is corrected
PostgresNode_Base::clean deletes data_dir and logs_dirPostgresNode::clean calls PostgresNode_Base::clean and deletes base_dir.
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedMar 17, 2025
commit9e1979f3b7818d38778f1094e2314cfd0718835a
12 changes: 12 additions & 0 deletionstestgres/node.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -186,6 +186,18 @@ def utils_log_name(self):
def pg_log_name(self):
return self.pg_log_file

def cleanup(self, max_attempts=3, full=False):
super().cleanup(max_attempts, full)

base_dir_items = self.os_ops.listdir(self.base_dir)
assert base_dir_items is not None
assert type(base_dir_items) == list # noqa: E721

if len(base_dir_items) == 0:
self.os_ops.rmdirs(self.base_dir, ignore_errors=False)

return self


class NodeApp:

Expand Down
10 changes: 3 additions & 7 deletionstestgres/node_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1170,22 +1170,18 @@ def cleanup(self, max_attempts=3, full=False):

Args:
max_attempts: how many times should we try to stop()?
full: cleanfull basedir
full: cleanlogsdir, too.

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

self._try_shutdown(max_attempts)

# choose directory to be removed
if testgres_config.node_cleanup_full or full:
rm_dir = self.base_dir # everything
else:
rm_dir = self.data_dir # just data, save logs

self._os_ops.rmdirs(rm_dir, ignore_errors=False)
self._os_ops.rmdirs(self.logs_dir, ignore_errors=False)

self._os_ops.rmdirs(self.data_dir, ignore_errors=False)
return self

@method_decorator(positional_args_hack(['dbname', 'query']))
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp