Skip to content

Commit eda1a5b

Browse files
author
vshepard
committed
Add testgres.plugins to plugin
1 parent 03d8f96 commit eda1a5b

File tree

12 files changed

+34
-13
lines changed

12 files changed

+34
-13
lines changed

plugins/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from pg_probackup2.gdb import GDBobj
2+
from pg_probackup2.app import ProbackupApp, ProbackupException
3+
from pg_probackup2.init_helpers import init_params
4+
from pg_probackup2.storage.fs_backup import FSTestBackupDir
5+
6+
__all__ = [
7+
"ProbackupApp", "ProbackupException", "init_params", "FSTestBackupDir", "GDBobj"
8+
]
File renamed without changes.
File renamed without changes.
File renamed without changes.

testgres/plugins/probackup/storage/fs_backup.py renamed to plugins/pg_probackup2/storage/fs_backup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import shutil
66

7-
from testgres.plugins.probackup.init_helpers import init_params
7+
from pg_probackup2.init_helpers import init_params
88

99

1010
class TestBackupDir:

plugins/setup.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
try:
2+
from setuptools import setup
3+
except ImportError:
4+
from distutils.core import setup
5+
6+
setup(
7+
version='0.0.1',
8+
name='testgres-pg_probackup2',
9+
packages=['pg_probackup2', 'pg_probackup2.storage'],
10+
description='Plugin for testgres that manages pg_probackup2',
11+
url='https://github.com/postgrespro/testgres',
12+
long_description_content_type='text/markdown',
13+
license='PostgreSQL',
14+
keywords=['pg_probackup'],
15+
install_requires=['testgres>=1.9.2']
16+
)
17+
18+

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@
2626
with open('README.md', 'r') as f:
2727
readme = f.read()
2828

29+
2930
setup(
3031
version='1.9.2',
3132
name='testgres',
32-
packages=['testgres', 'testgres.operations', 'testgres.plugins.probackup', 'testgres.plugins.probackup.storage'],
33+
packages=['testgres', 'testgres.operations'],
3334
description='Testing utility for PostgreSQL and its extensions',
3435
url='https://github.com/postgrespro/testgres',
3536
long_description=readme,

testgres/__init__.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
from .operations.os_ops import OsOperations, ConnectionParams
5252
from .operations.local_ops import LocalOperations
5353
from .operations.remote_ops import RemoteOperations
54-
from .plugins.probackup.gdb import GDBobj
55-
from .plugins.probackup.app import ProbackupApp
56-
from .plugins.probackup.app import ProbackupException
57-
from .plugins.probackup.init_helpers import init_params
58-
from .plugins.probackup.storage.fs_backup import FSTestBackupDir
5954

6055
__all__ = [
6156
"get_new_node",
@@ -68,6 +63,5 @@
6863
"PostgresNode", "NodeApp",
6964
"reserve_port", "release_port", "bound_ports", "get_bin_path", "get_pg_config", "get_pg_version",
7065
"First", "Any",
71-
"OsOperations", "LocalOperations", "RemoteOperations", "ConnectionParams",
72-
"init_params", "FSTestBackupDir", "ProbackupException", "ProbackupApp", "GDBobj"
66+
"OsOperations", "LocalOperations", "RemoteOperations", "ConnectionParams"
7367
]

testgres/plugins/probackup/storage/__init__.py

Whitespace-only changes.

tests/test_simple_remote.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@
5252
from testgres.utils import PgVer
5353
from testgres.node import ProcessProxy, ConnectionParams
5454

55-
conn_params = ConnectionParams(host=os.getenv('RDBMS_TESTPOOL1_HOST') or '172.18.0.3',
56-
username='dev',
57-
ssh_key=os.getenv(
58-
'RDBMS_TESTPOOL_SSHKEY') or '../../container_files/postgres/ssh/id_ed25519')
55+
conn_params = ConnectionParams(host=os.getenv('RDBMS_TESTPOOL1_HOST') or '172.18.0.2',
56+
username=os.getenv('RDBMS_TESTPOOL_USERNAME') or 'dev',
57+
ssh_key=os.getenv('RDBMS_TESTPOOL_SSHKEY') or
58+
'/home/vika/Desktop/work/dev-ee-probackup/container_files/postgres/ssh/id_ed25519.pub')
5959
os_ops = RemoteOperations(conn_params)
6060
testgres_config.set_os_ops(os_ops=os_ops)
6161

0 commit comments

Comments
 (0)