testgres-pg-probackup2 0.9.2__tar.gz → 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. testgres_pg_probackup2-0.10.0/PKG-INFO +89 -0
  2. {testgres_pg_probackup2-0.9.2 → testgres_pg_probackup2-0.10.0}/README.md +4 -4
  3. testgres_pg_probackup2-0.10.0/pyproject.toml +65 -0
  4. testgres_pg_probackup2-0.10.0/src/__init__.py +1 -0
  5. {testgres_pg_probackup2-0.9.2/pg_probackup2 → testgres_pg_probackup2-0.10.0/src}/app.py +1 -1
  6. {testgres_pg_probackup2-0.9.2/pg_probackup2 → testgres_pg_probackup2-0.10.0/src}/gdb.py +4 -3
  7. testgres_pg_probackup2-0.10.0/testgres_pg_probackup2.egg-info/PKG-INFO +89 -0
  8. testgres_pg_probackup2-0.10.0/testgres_pg_probackup2.egg-info/SOURCES.txt +16 -0
  9. testgres_pg_probackup2-0.10.0/testgres_pg_probackup2.egg-info/requires.txt +4 -0
  10. testgres_pg_probackup2-0.10.0/tests/test_basic.py +142 -0
  11. testgres_pg_probackup2-0.10.0/tests/test_common.py +17 -0
  12. testgres_pg_probackup2-0.10.0/tests/test_gdb.py +29 -0
  13. testgres_pg_probackup2-0.9.2/PKG-INFO +0 -22
  14. testgres_pg_probackup2-0.9.2/pg_probackup2/storage/__init__.py +0 -0
  15. testgres_pg_probackup2-0.9.2/setup.py +0 -23
  16. testgres_pg_probackup2-0.9.2/testgres_pg_probackup2.egg-info/PKG-INFO +0 -22
  17. testgres_pg_probackup2-0.9.2/testgres_pg_probackup2.egg-info/SOURCES.txt +0 -13
  18. testgres_pg_probackup2-0.9.2/testgres_pg_probackup2.egg-info/requires.txt +0 -4
  19. {testgres_pg_probackup2-0.9.2 → testgres_pg_probackup2-0.10.0}/setup.cfg +0 -0
  20. {testgres_pg_probackup2-0.9.2/pg_probackup2 → testgres_pg_probackup2-0.10.0/src}/init_helpers.py +0 -0
  21. {testgres_pg_probackup2-0.9.2/pg_probackup2 → testgres_pg_probackup2-0.10.0/src/storage}/__init__.py +0 -0
  22. {testgres_pg_probackup2-0.9.2/pg_probackup2 → testgres_pg_probackup2-0.10.0/src}/storage/fs_backup.py +0 -0
  23. {testgres_pg_probackup2-0.9.2 → testgres_pg_probackup2-0.10.0}/testgres_pg_probackup2.egg-info/dependency_links.txt +0 -0
  24. {testgres_pg_probackup2-0.9.2 → testgres_pg_probackup2-0.10.0}/testgres_pg_probackup2.egg-info/top_level.txt +0 -0
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: testgres_pg_probackup2
3
+ Version: 0.10.0
4
+ Summary: Plugin for testgres that manages pg_probackup2
5
+ Author-email: Postgres Professional <testgres@postgrespro.ru>
6
+ License: PostgreSQL
7
+ Project-URL: HomePage, https://github.com/postgrespro/testgres-pg_probackup2
8
+ Keywords: pg_probackup,testing,testgres
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: Unix
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.7.3
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: lz4
25
+ Requires-Dist: pefile
26
+ Requires-Dist: testgres<1.18,>=1.14.4
27
+ Requires-Dist: zstd
28
+
29
+ [![PyPI package version](https://badge.fury.io/py/testgres-pg_probackup2.svg)](https://badge.fury.io/py/testgres-pg_probackup2)
30
+
31
+ # testgres-pg_probackup2
32
+
33
+ Control and testing utility for [pg_probackup2](https://github.com/postgrespro/pg_probackup). Python 3.7+ is supported.
34
+
35
+
36
+ ## Installation
37
+
38
+ To install `testgres-pg_probackup`, run:
39
+
40
+ ```
41
+ pip install testgres-pg_probackup
42
+ ```
43
+
44
+ We encourage you to use `virtualenv` for your testing environment.
45
+ The package requires testgres.
46
+
47
+ ## Usage
48
+
49
+ ### Environment variables
50
+
51
+ | Variable | Required | Default value | Description |
52
+ | - | - | - | - |
53
+ | PGPROBACKUP_TMP_DIR | No | tests/tmp_dirs | The root of the temporary directory hierarchy where tests store data and logs. Relative paths start from the current working directory. |
54
+ | PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX | No | Temporary test hierarchy | Prefix of the test backup directories. Must be an absolute path. Use this variable to store test backups in a location other than the temporary test hierarchy. |
55
+ | PG_PROBACKUP_VALGRIND | No | Not set | Run pg_probackup through valgrind if the variable is set to 'y'. Setting PG_PROBACKUP_VALGRIND_SUP (see below) to any value enables valgrind just like setting `PG_PROBACKUP_VALGRIND=y` would do. |
56
+ | PG_PROBACKUP_VALGRIND_SUP | No | Not set | Specify the path to a valgrind suppression file. If the variable is not set then a file named "valgrind.supp" is searched for in the current working directory (normally the root of pg_probackup repository). Setting PG_PROBACKUP_VALGRIND_SUP to any value enables valgrind just like setting `PG_PROBACKUP_VALGRIND=y` (see above) would do. |
57
+
58
+ See [Testgres](https://github.com/postgrespro/testgres/tree/master#environment) on how to configure a custom Postgres installation using `PG_CONFIG` and `PG_BIN` environment variables.
59
+
60
+ ### Examples
61
+
62
+ Here is an example of what you can do with `testgres-pg_probackup2`:
63
+
64
+ ```python
65
+ # You can see full script here plugins/pg_probackup2/pg_probackup2/tests/basic_test.py
66
+ def test_full_backup(self):
67
+ # Setting up a simple test node
68
+ node = self.pg_node.make_simple('node', pg_options={"fsync": "off", "synchronous_commit": "off"})
69
+
70
+ # Initialize and configure Probackup
71
+ self.pb.init()
72
+ self.pb.add_instance('node', node)
73
+ self.pb.set_archiving('node', node)
74
+
75
+ # Start the node and initialize pgbench
76
+ node.slow_start()
77
+ node.pgbench_init(scale=100, no_vacuum=True)
78
+
79
+ # Perform backup and validation
80
+ backup_id = self.pb.backup_node('node', node)
81
+ out = self.pb.validate('node', backup_id)
82
+
83
+ # Check if the backup is valid
84
+ self.assertIn(f"INFO: Backup {backup_id} is valid", out)
85
+ ```
86
+
87
+ ## Authors
88
+
89
+ [Postgres Professional](https://postgrespro.ru/about)
@@ -1,20 +1,20 @@
1
1
  [![PyPI package version](https://badge.fury.io/py/testgres-pg_probackup2.svg)](https://badge.fury.io/py/testgres-pg_probackup2)
2
2
 
3
- # testgres - pg_probackup2
3
+ # testgres-pg_probackup2
4
4
 
5
- Control and testing utility for [pg_probackup2](https://github.com/postgrespro/pg_probackup). Python 3.5+ is supported.
5
+ Control and testing utility for [pg_probackup2](https://github.com/postgrespro/pg_probackup). Python 3.7+ is supported.
6
6
 
7
7
 
8
8
  ## Installation
9
9
 
10
- To install `testgres`, run:
10
+ To install `testgres-pg_probackup`, run:
11
11
 
12
12
  ```
13
13
  pip install testgres-pg_probackup
14
14
  ```
15
15
 
16
16
  We encourage you to use `virtualenv` for your testing environment.
17
- The package requires testgres~=1.9.3.
17
+ The package requires testgres.
18
18
 
19
19
  ## Usage
20
20
 
@@ -0,0 +1,65 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.setuptools.package-dir]
6
+ "pg_probackup2" = "src"
7
+
8
+ [tool.setuptools.dynamic]
9
+ version = {attr = "pg_probackup2.__version__"}
10
+
11
+ [tool.flake8]
12
+ extend-ignore = ["E501"]
13
+ exclude = [".git", "__pycache__", "env", "venv"]
14
+
15
+ [tool.pytest.ini_options]
16
+ testpaths = ["tests"]
17
+ log_file_level = "NOTSET"
18
+ log_file_format = "%(levelname)8s [%(asctime)s] %(message)s"
19
+ log_file_date_format = "%Y-%m-%d %H:%M:%S"
20
+
21
+ [project]
22
+ name = "testgres_pg_probackup2"
23
+ dynamic = ["version"]
24
+ description = "Plugin for testgres that manages pg_probackup2"
25
+ readme = "README.md"
26
+ requires-python = ">=3.7.3"
27
+
28
+ # Формат для совместимости с Python 3.7
29
+ license = {text = "PostgreSQL"}
30
+
31
+ authors = [
32
+ {name = "Postgres Professional", email = "testgres@postgrespro.ru"},
33
+ ]
34
+
35
+ keywords = [
36
+ "pg_probackup",
37
+ "testing",
38
+ "testgres",
39
+ ]
40
+
41
+ classifiers = [
42
+ "Intended Audience :: Developers",
43
+ "Operating System :: Unix",
44
+ "Programming Language :: Python :: 3 :: Only",
45
+ "Programming Language :: Python :: 3.7",
46
+ "Programming Language :: Python :: 3.8",
47
+ "Programming Language :: Python :: 3.9",
48
+ "Programming Language :: Python :: 3.10",
49
+ "Programming Language :: Python :: 3.11",
50
+ "Programming Language :: Python :: 3.12",
51
+ "Programming Language :: Python :: 3.13",
52
+ "Programming Language :: Python :: 3.14",
53
+ "Topic :: Software Development :: Libraries",
54
+ "Topic :: Software Development :: Testing",
55
+ ]
56
+
57
+ dependencies = [
58
+ "lz4",
59
+ "pefile",
60
+ "testgres>=1.14.4,<1.18",
61
+ "zstd",
62
+ ]
63
+
64
+ [project.urls]
65
+ "HomePage" = "https://github.com/postgrespro/testgres-pg_probackup2"
@@ -0,0 +1 @@
1
+ __version__ = "0.10.0"
@@ -196,7 +196,7 @@ class ProbackupApp:
196
196
  f"but found: {self.valgrind_sup_path}")
197
197
  else:
198
198
  # Assume the tests are started from the root of pg_probackup repository
199
- valgrind_cmd += [f"--suppressions=.valgrind.supp"]
199
+ valgrind_cmd += ["--suppressions=.valgrind.supp"]
200
200
 
201
201
  return valgrind_cmd + cmdline
202
202
 
@@ -354,14 +354,15 @@ def needs_gdb(func):
354
354
  reason = check[1]
355
355
  if check[0] == "skip":
356
356
  return unittest.skip(reason)(func)
357
- elif check[0] == "fail":
357
+
358
+ if check[0] == "fail":
358
359
  @functools.wraps(func)
359
360
  def fail_wrapper(self, *args, **kwargs):
360
361
  self.fail(reason)
361
362
 
362
363
  return fail_wrapper
363
- else:
364
- raise "Wrong action {0}".format(check)
364
+
365
+ raise RuntimeError("Wrong action {0}".format(check))
365
366
 
366
367
 
367
368
  _set_gdb(GDBobj)
@@ -0,0 +1,89 @@
1
+ Metadata-Version: 2.4
2
+ Name: testgres_pg_probackup2
3
+ Version: 0.10.0
4
+ Summary: Plugin for testgres that manages pg_probackup2
5
+ Author-email: Postgres Professional <testgres@postgrespro.ru>
6
+ License: PostgreSQL
7
+ Project-URL: HomePage, https://github.com/postgrespro/testgres-pg_probackup2
8
+ Keywords: pg_probackup,testing,testgres
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Operating System :: Unix
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.7
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.7.3
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: lz4
25
+ Requires-Dist: pefile
26
+ Requires-Dist: testgres<1.18,>=1.14.4
27
+ Requires-Dist: zstd
28
+
29
+ [![PyPI package version](https://badge.fury.io/py/testgres-pg_probackup2.svg)](https://badge.fury.io/py/testgres-pg_probackup2)
30
+
31
+ # testgres-pg_probackup2
32
+
33
+ Control and testing utility for [pg_probackup2](https://github.com/postgrespro/pg_probackup). Python 3.7+ is supported.
34
+
35
+
36
+ ## Installation
37
+
38
+ To install `testgres-pg_probackup`, run:
39
+
40
+ ```
41
+ pip install testgres-pg_probackup
42
+ ```
43
+
44
+ We encourage you to use `virtualenv` for your testing environment.
45
+ The package requires testgres.
46
+
47
+ ## Usage
48
+
49
+ ### Environment variables
50
+
51
+ | Variable | Required | Default value | Description |
52
+ | - | - | - | - |
53
+ | PGPROBACKUP_TMP_DIR | No | tests/tmp_dirs | The root of the temporary directory hierarchy where tests store data and logs. Relative paths start from the current working directory. |
54
+ | PG_PROBACKUP_TEST_BACKUP_DIR_PREFIX | No | Temporary test hierarchy | Prefix of the test backup directories. Must be an absolute path. Use this variable to store test backups in a location other than the temporary test hierarchy. |
55
+ | PG_PROBACKUP_VALGRIND | No | Not set | Run pg_probackup through valgrind if the variable is set to 'y'. Setting PG_PROBACKUP_VALGRIND_SUP (see below) to any value enables valgrind just like setting `PG_PROBACKUP_VALGRIND=y` would do. |
56
+ | PG_PROBACKUP_VALGRIND_SUP | No | Not set | Specify the path to a valgrind suppression file. If the variable is not set then a file named "valgrind.supp" is searched for in the current working directory (normally the root of pg_probackup repository). Setting PG_PROBACKUP_VALGRIND_SUP to any value enables valgrind just like setting `PG_PROBACKUP_VALGRIND=y` (see above) would do. |
57
+
58
+ See [Testgres](https://github.com/postgrespro/testgres/tree/master#environment) on how to configure a custom Postgres installation using `PG_CONFIG` and `PG_BIN` environment variables.
59
+
60
+ ### Examples
61
+
62
+ Here is an example of what you can do with `testgres-pg_probackup2`:
63
+
64
+ ```python
65
+ # You can see full script here plugins/pg_probackup2/pg_probackup2/tests/basic_test.py
66
+ def test_full_backup(self):
67
+ # Setting up a simple test node
68
+ node = self.pg_node.make_simple('node', pg_options={"fsync": "off", "synchronous_commit": "off"})
69
+
70
+ # Initialize and configure Probackup
71
+ self.pb.init()
72
+ self.pb.add_instance('node', node)
73
+ self.pb.set_archiving('node', node)
74
+
75
+ # Start the node and initialize pgbench
76
+ node.slow_start()
77
+ node.pgbench_init(scale=100, no_vacuum=True)
78
+
79
+ # Perform backup and validation
80
+ backup_id = self.pb.backup_node('node', node)
81
+ out = self.pb.validate('node', backup_id)
82
+
83
+ # Check if the backup is valid
84
+ self.assertIn(f"INFO: Backup {backup_id} is valid", out)
85
+ ```
86
+
87
+ ## Authors
88
+
89
+ [Postgres Professional](https://postgrespro.ru/about)
@@ -0,0 +1,16 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/__init__.py
4
+ src/app.py
5
+ src/gdb.py
6
+ src/init_helpers.py
7
+ src/storage/__init__.py
8
+ src/storage/fs_backup.py
9
+ testgres_pg_probackup2.egg-info/PKG-INFO
10
+ testgres_pg_probackup2.egg-info/SOURCES.txt
11
+ testgres_pg_probackup2.egg-info/dependency_links.txt
12
+ testgres_pg_probackup2.egg-info/requires.txt
13
+ testgres_pg_probackup2.egg-info/top_level.txt
14
+ tests/test_basic.py
15
+ tests/test_common.py
16
+ tests/test_gdb.py
@@ -0,0 +1,4 @@
1
+ lz4
2
+ pefile
3
+ testgres<1.18,>=1.14.4
4
+ zstd
@@ -0,0 +1,142 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import shutil
5
+ import pytest
6
+ import unittest
7
+
8
+ import testgres
9
+ from src.app import ProbackupApp
10
+ from src.init_helpers import Init, init_params
11
+ from src.storage.fs_backup import FSTestBackupDir
12
+
13
+
14
+ class ProbackupTest(unittest.TestCase):
15
+ pg_node: testgres.NodeApp
16
+
17
+ @staticmethod
18
+ def probackup_is_available() -> bool:
19
+ p = os.environ.get("PGPROBACKUPBIN")
20
+
21
+ if p is None:
22
+ return False
23
+
24
+ if not os.path.exists(p):
25
+ return False
26
+
27
+ return True
28
+
29
+ @pytest.fixture(autouse=True, scope="function")
30
+ def implicit_fixture(self, request: pytest.FixtureRequest):
31
+ assert isinstance(request, pytest.FixtureRequest)
32
+ self.helper__setUp(request)
33
+ yield
34
+ self.helper__tearDown()
35
+
36
+ def helper__setUp(self, request: pytest.FixtureRequest):
37
+ assert isinstance(request, pytest.FixtureRequest)
38
+
39
+ self.helper__setup_test_environment(request)
40
+ self.helper__setup_test_paths()
41
+ self.helper__setup_backup_dir()
42
+ self.helper__setup_probackup()
43
+ return
44
+
45
+ def helper__setup_test_environment(self, request: pytest.FixtureRequest):
46
+ assert isinstance(request, pytest.FixtureRequest)
47
+
48
+ self.output = None
49
+ self.cmd = None
50
+ self.nodes_to_cleanup = []
51
+ self.module_name, self.fname = request.node.cls.__name__, request.node.name
52
+ self.test_env = Init().test_env()
53
+ return
54
+
55
+ def helper__setup_test_paths(self):
56
+ self.rel_path = os.path.join(self.module_name, self.fname)
57
+ self.test_path = os.path.join(init_params.tmp_path, self.rel_path)
58
+ os.makedirs(self.test_path, exist_ok=True)
59
+ self.pb_log_path = os.path.join(self.test_path, "pb_log")
60
+
61
+ def helper__setup_backup_dir(self):
62
+ self.backup_dir = self.helper__build_backup_dir('backup')
63
+ self.backup_dir.cleanup()
64
+ return
65
+
66
+ def helper__setup_probackup(self):
67
+ self.pg_node = testgres.NodeApp(self.test_path, self.nodes_to_cleanup)
68
+ self.pb = ProbackupApp(
69
+ self,
70
+ self.pg_node,
71
+ self.pb_log_path,
72
+ self.test_env,
73
+ auto_compress_alg='zlib',
74
+ backup_dir=self.backup_dir,
75
+ )
76
+ return
77
+
78
+ def helper__tearDown(self):
79
+ if os.path.exists(self.test_path):
80
+ shutil.rmtree(self.test_path)
81
+ return
82
+
83
+ def helper__build_backup_dir(self, backup='backup'):
84
+ return FSTestBackupDir(rel_path=self.rel_path, backup=backup)
85
+
86
+
87
+ @pytest.mark.skipif(
88
+ not ProbackupTest.probackup_is_available(),
89
+ reason="Check that PGPROBACKUPBIN is defined and is valid.",
90
+ )
91
+ class TestBasic(ProbackupTest):
92
+ def test_full_backup(self):
93
+ assert self.pg_node is not None
94
+ assert type(self.pg_node) == testgres.NodeApp # noqa: E721
95
+ assert self.pb is not None
96
+ assert type(self.pb) == ProbackupApp # noqa: E721
97
+
98
+ # Setting up a simple test node
99
+ node = self.pg_node.make_simple(
100
+ 'node',
101
+ pg_options={"fsync": "off", "synchronous_commit": "off"},
102
+ )
103
+
104
+ assert node is not None
105
+ assert type(node) == testgres.PostgresNode # noqa: E721
106
+
107
+ with node:
108
+ # Initialize and configure Probackup
109
+ self.pb.init()
110
+ self.pb.add_instance('node', node)
111
+ self.pb.set_archiving('node', node)
112
+
113
+ # Start the node and initialize pgbench
114
+ node.slow_start()
115
+ node.pgbench_init(scale=100, no_vacuum=True)
116
+
117
+ # Perform backup and validation
118
+ backup_id = self.pb.backup_node('node', node)
119
+ out = self.pb.validate('node', backup_id)
120
+ assert type(out) is str
121
+
122
+ # Check if the backup is valid
123
+ assert f"INFO: Backup {backup_id} is valid" in out
124
+ return
125
+
126
+
127
+ def test_form_cmdline_respects_use_valgrind(tmp_path):
128
+ app = ProbackupApp.__new__(ProbackupApp)
129
+ app.valgrind = 'y'
130
+ app.valgrind_sup_path = None
131
+ app.pb_log_path = str(tmp_path)
132
+
133
+ binary = '/bin/true'
134
+ command = ['backup', '--instance=node']
135
+
136
+ wrapped = app._form_cmdline(binary, command)
137
+ plain = app._form_cmdline(binary, command, use_valgrind=False)
138
+
139
+ assert wrapped[0] == 'valgrind'
140
+ assert binary in wrapped
141
+ assert plain == [binary, *command]
142
+ return
@@ -0,0 +1,17 @@
1
+ from src import __version__ as pg_probackup2_version
2
+
3
+ from packaging.version import Version
4
+
5
+
6
+ class TestCommon:
7
+ def test_pg_probackup2_version(self):
8
+ assert type(pg_probackup2_version) is str
9
+
10
+ v = Version(pg_probackup2_version)
11
+
12
+ assert v.major == 0
13
+ assert v.minor == 10
14
+ assert v.micro == 0
15
+
16
+ assert str(v) == pg_probackup2_version
17
+ return
@@ -0,0 +1,29 @@
1
+ import pytest
2
+ from unittest import mock
3
+
4
+ from src import gdb
5
+
6
+
7
+ def test_needs_gdb_decorator_behavior():
8
+ # Isolate check flag, as in the original test
9
+ with mock.patch.object(gdb, '_check_gdb_flag_or_skip_test', return_value=None):
10
+
11
+ # Создаем тестовую функцию с декоратором @gdb.needs_gdb
12
+ @gdb.needs_gdb
13
+ def dummy_test_func(flag):
14
+ return flag
15
+
16
+ # Check that the decorator correctly sets the attribute (or executes the logic)
17
+ # Note: The original code checked self._gdb_decorated.
18
+ # Depending on the decorator implementation, the attribute
19
+ # may be on the function itself:
20
+ assert getattr(dummy_test_func, '_gdb_decorated', True)
21
+ return
22
+
23
+
24
+ # We check the operation of the parameterizer itself in pytest style
25
+ @pytest.mark.parametrize("flag", [1, 0])
26
+ def test_parameterized_args_integration(flag):
27
+ with mock.patch.object(gdb, '_check_gdb_flag_or_skip_test', return_value=None):
28
+ assert flag in (0, 1)
29
+ return
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: testgres_pg_probackup2
3
- Version: 0.9.2
4
- Summary: Plugin for testgres that manages pg_probackup2
5
- Home-page: https://github.com/postgrespro/testgres
6
- Author: Postgres Professional
7
- Author-email: testgres@postgrespro.ru
8
- License: PostgreSQL
9
- Keywords: pg_probackup,testing,testgres
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: lz4
12
- Requires-Dist: pefile
13
- Requires-Dist: testgres>=1.14.4
14
- Requires-Dist: zstd
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: description-content-type
18
- Dynamic: home-page
19
- Dynamic: keywords
20
- Dynamic: license
21
- Dynamic: requires-dist
22
- Dynamic: summary
@@ -1,23 +0,0 @@
1
- try:
2
- from setuptools import setup
3
- except ImportError:
4
- from distutils.core import setup
5
-
6
- setup(
7
- version='0.9.2',
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
- author='Postgres Professional',
15
- author_email='testgres@postgrespro.ru',
16
- keywords=['pg_probackup', 'testing', 'testgres'],
17
- install_requires=[
18
- 'lz4',
19
- 'pefile',
20
- 'testgres>=1.14.4',
21
- 'zstd'
22
- ]
23
- )
@@ -1,22 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: testgres_pg_probackup2
3
- Version: 0.9.2
4
- Summary: Plugin for testgres that manages pg_probackup2
5
- Home-page: https://github.com/postgrespro/testgres
6
- Author: Postgres Professional
7
- Author-email: testgres@postgrespro.ru
8
- License: PostgreSQL
9
- Keywords: pg_probackup,testing,testgres
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: lz4
12
- Requires-Dist: pefile
13
- Requires-Dist: testgres>=1.14.4
14
- Requires-Dist: zstd
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: description-content-type
18
- Dynamic: home-page
19
- Dynamic: keywords
20
- Dynamic: license
21
- Dynamic: requires-dist
22
- Dynamic: summary
@@ -1,13 +0,0 @@
1
- README.md
2
- setup.py
3
- pg_probackup2/__init__.py
4
- pg_probackup2/app.py
5
- pg_probackup2/gdb.py
6
- pg_probackup2/init_helpers.py
7
- pg_probackup2/storage/__init__.py
8
- pg_probackup2/storage/fs_backup.py
9
- testgres_pg_probackup2.egg-info/PKG-INFO
10
- testgres_pg_probackup2.egg-info/SOURCES.txt
11
- testgres_pg_probackup2.egg-info/dependency_links.txt
12
- testgres_pg_probackup2.egg-info/requires.txt
13
- testgres_pg_probackup2.egg-info/top_level.txt
@@ -1,4 +0,0 @@
1
- lz4
2
- pefile
3
- testgres>=1.14.4
4
- zstd