8000 Remove init param by demonolock · Pull Request #115 · postgrespro/testgres · GitHub
[go: up one dir, main page]

Skip to content

Remove init param #115

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 2 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Safe group from re.search
  • Loading branch information
vshepard committed Mar 4, 2024
commit ec9a615b095667cd8a32b513a795402f6d6d6f5b
21 changes: 12 additions & 9 deletions testgres/plugins/pg_probackup2/pg_probackup2/init_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,24 @@ def __init__(self):
[self.probackup_path, "--version"],
stderr=subprocess.STDOUT,
).decode('utf-8')
self.probackup_version = re.search(r"\d+\.\d+\.\d+",
probackup_version_output
).group(0)
compressions = re.search(r"\(compressions: ([^)]*)\)",
probackup_version_output).group(1)
self.probackup_compressions = {s.strip() for s in compressions.split(',')}
match = re.search(r"\d+\.\d+\.\d+",
probackup_version_output)
self.probackup_version = match.group(0) if match else None
match = re.search(r"\(compressions: ([^)]*)\)", probackup_version_output)
compressions = match.group(1) if match else None
if compressions:
self.probackup_compressions = {s.strip() for s in compressions.split(',')}
else:
self.probackup_compressions = []

if self.probackup_old_path:
old_probackup_version_output = subprocess.check_output(
[self.probackup_old_path, "--version"],
stderr=subprocess.STDOUT,
).decode('utf-8')
self.old_probackup_version = re.search(r"\d+\.\d+\.\d+",
old_probackup_version_output
).group(0)
match = re.search(r"\d+\.\d+\.\d+",
old_probackup_version_output)
self.old_probackup_version = match.group(0) if match else None

self.remote = test_env.get('PGPROBACKUP_SSH_REMOTE', None) == 'ON'
self.ptrack = test_env.get('PG_PROBACKUP_PTRACK', None) == 'ON' and self.pg_config_version >= 110000
Expand Down
0