diff --git a/setup.py b/setup.py index b006c8bf..a41094d6 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ readme = f.read() setup( - version='1.10.0', + version='1.10.3', name='testgres', packages=['testgres', 'testgres.operations', 'testgres.helpers'], description='Testing utility for PostgreSQL and its extensions', diff --git a/testgres/node.py b/testgres/node.py index 0f1dcf98..9b241b1a 100644 --- a/testgres/node.py +++ b/testgres/node.py @@ -751,7 +751,7 @@ def stop(self, params=[], wait=True): """ if not self.is_started: return self - + print("Остановка ноды\n") _params = [ self._get_bin_path("pg_ctl"), "-D", self.data_dir, @@ -1155,7 +1155,7 @@ def poll_query_until(self, assert sleep_time > 0 attempts = 0 while max_attempts == 0 or attempts < max_attempts: - print(f"Pooling {attempts}") + print(f"Запуск ноды. Попытка {attempts+1}\n") try: res = self.execute(dbname=dbname, query=query, diff --git a/testgres/plugins/pg_probackup2/pg_probackup2/app.py b/testgres/plugins/pg_probackup2/pg_probackup2/app.py index 94dcd997..5c0cdb8c 100644 --- a/testgres/plugins/pg_probackup2/pg_probackup2/app.py +++ b/testgres/plugins/pg_probackup2/pg_probackup2/app.py @@ -1,6 +1,7 @@ import contextlib import importlib import json +import logging import os import re import subprocess @@ -43,14 +44,14 @@ def __str__(self): class ProbackupApp: def __init__(self, test_class: unittest.TestCase, - pg_node, pb_log_path, test_env, auto_compress_alg, backup_dir): + pg_node, pb_log_path, test_env, auto_compress_alg, backup_dir, probackup_path=None): self.test_class = test_class self.pg_node = pg_node self.pb_log_path = pb_log_path self.test_env = test_env self.auto_compress_alg = auto_compress_alg self.backup_dir = backup_dir - self.probackup_path = init_params.probackup_path + self.probackup_path = probackup_path or init_params.probackup_path self.probackup_old_path = init_params.probackup_old_path self.remote = init_params.remote self.verbose = init_params.verbose @@ -58,7 +59,7 @@ def __init__(self, test_class: unittest.TestCase, self.test_class.output = None def run(self, command, gdb=False, old_binary=False, return_id=True, env=None, - skip_log_directory=False, expect_error=False, use_backup_dir=True): + skip_log_directory=False, expect_error=False, use_backup_dir=True, silent=False): """ Run pg_probackup backup_dir: target directory for making backup @@ -97,8 +98,9 @@ def run(self, command, gdb=False, old_binary=False, return_id=True, env=None, strcommand += ' -j 1' self.test_class.cmd = binary_path + ' ' + strcommand - if self.verbose: - print(self.test_class.cmd) + if not silent: + logging.info(self.test_class.cmd.replace(self.probackup_path, self.probackup_path.split('/')[-1]) + .replace('/'.join(self.backup_dir.path.split('/')[0:-2]), '..')) cmdline = [binary_path, *command] if gdb is True: @@ -207,7 +209,8 @@ def backup_node( old_binary=False, return_id=True, no_remote=False, env=None, expect_error=False, - sync=False + sync=False, + silent=False ): if options is None: options = [] @@ -247,7 +250,7 @@ def backup_node( cmd_list += ['--no-sync'] return self.run(cmd_list + options, gdb, old_binary, return_id, env=env, - expect_error=expect_error) + expect_error=expect_error, silent=silent) def backup_replica_node(self, instance, node, data_dir=False, *, master, backup_type='full', datname=False, @@ -394,7 +397,8 @@ def show( options=None, as_text=False, as_json=True, old_binary=False, env=None, expect_error=False, - gdb=False + gdb=False, + silent=False ): if options is None: @@ -417,12 +421,12 @@ def show( if as_text: # You should print it when calling as_text=true return self.run(cmd_list + options, old_binary=old_binary, env=env, - expect_error=expect_error, gdb=gdb) + expect_error=expect_error, gdb=gdb, silent=silent) # get show result as list of lines if as_json: text_json = str(self.run(cmd_list + options, old_binary=old_binary, env=env, - expect_error=expect_error, gdb=gdb)) + expect_error=expect_error, gdb=gdb, silent=silent)) try: if expect_error: return text_json diff --git a/testgres/plugins/pg_probackup2/setup.py b/testgres/plugins/pg_probackup2/setup.py index 381d7ae2..2ff5a503 100644 --- a/testgres/plugins/pg_probackup2/setup.py +++ b/testgres/plugins/pg_probackup2/setup.py @@ -4,7 +4,7 @@ from distutils.core import setup setup( - version='0.0.2', + version='0.0.3', name='testgres_pg_probackup2', packages=['pg_probackup2', 'pg_probackup2.storage'], description='Plugin for testgres that manages pg_probackup2', pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy